Files
BrightSharp.Toolkit/docs/help/apply-themes.md
Vitaliy Semianiaka 7e8f79ac6f Update apply-themes.md
2017-05-19 20:56:28 +03:00

943 B

Apply themes with App.xaml

App.xaml

<ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/brightsharp;component/generic.xaml" />
        
    </ResourceDictionary.MergedDictionaries>

</ResourceDictionary>

Change themes by ThemeManager

Change by static property

    ThemeManager.CurrentTheme = ColorThemes.Classic;

Change themes by ResourceDictionary

Also you can change theme by adding resource dictionary after generic.xaml. Use one of them:

<ResourceDictionary Source="/brightsharp;component/style.devlab.xaml" />
or
<ResourceDictionary Source="/brightsharp;component/style.blue.xaml" />
or
<ResourceDictionary Source="/brightsharp;component/style.darkblue.xaml" />
or
<ResourceDictionary Source="/brightsharp;component/style.silver.xaml" />

NOTE

It is recommended use Background="{DynamicResource WindowBackgroundBrush}" for Window markup