Theme.Static.xaml (without compile, no perfomance difference with dynamic). +ThemeManager improvements.

This commit is contained in:
2017-08-31 15:55:40 +03:00
parent 9c2dc48ee2
commit 284cb40004
28 changed files with 6322 additions and 458 deletions

View File

@@ -4,7 +4,9 @@
```xml
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/brightsharp;component/generic.xaml" />
<ResourceDictionary Source="/brightsharp;component/themes/style.classic.xaml" />
<ResourceDictionary Source="/brightsharp;component/themes/theme.xaml" />
</ResourceDictionary.MergedDictionaries>
@@ -15,7 +17,7 @@
Change by `ThemeManager`
```c#
ThemeManager.CurrentTheme = ColorThemes.Classic;
ThemeManager.CurrentTheme = ColorThemes.DarkBlue;
```
# Change themes by ResourceDictionary
@@ -23,12 +25,15 @@ Change by `ThemeManager`
As default we use Classic theme.
You also can change theme by adding resource dictionary after generic.xaml. Use one of them:
```xml
<ResourceDictionary Source="/brightsharp;component/style.devlab.xaml" />
<ResourceDictionary Source="/brightsharp;component/style.blue.xaml" />
<ResourceDictionary Source="/brightsharp;component/style.darkblue.xaml" />
<ResourceDictionary Source="/brightsharp;component/style.silver.xaml" />
<ResourceDictionary Source="/brightsharp;component/themes/style.classic.xaml" />
<ResourceDictionary Source="/brightsharp;component/themes/style.devlab.xaml" />
<ResourceDictionary Source="/brightsharp;component/themes/style.silver.xaml" />
<ResourceDictionary Source="/brightsharp;component/themes/style.blue.xaml" />
<ResourceDictionary Source="/brightsharp;component/themes/style.darkblue.xaml" />
```
## NOTE
## NOTES
You can use custom window style named `BrightSharpWindowStyle`.
Also defined additional useful styles and extensions. For more info see Demo source code.
Also defined additional useful styles and extensions. For more info see Demo source code.
<!--Theme resource use `DynamicResource`. If you want, you can use `StaticResource` via **`theme.static.xaml`**.-->