File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ Or, you can add **WPF UI** resources manually.
37
37
If you want to change the theme while the application is running, you can call the static ` Apply ` method of the ` Theme ` class.
38
38
39
39
``` csharp
40
- Wpf .Ui .Appearance .Theme .Apply (
41
- Wpf .Ui .Appearance .ThemeType .Light , // Theme type
42
- Wpf .Ui .Appearance . BackgroundType .Mica , // Background type
43
- true // Whether to change accents automatically
40
+ Wpf .Ui .Appearance .ApplicationThemeManager .Apply (
41
+ Wpf .Ui .Appearance .ApplicationTheme .Light , // Theme type
42
+ Wpf .Ui .Controls . WindowBackdropType .Mica , // Background type
43
+ true // Whether to change accents automatically
44
44
);
45
45
```
46
46
@@ -59,10 +59,10 @@ public partial class MainWindow : Window
59
59
60
60
Loaded += (sender , args ) =>
61
61
{
62
- Wpf .Ui .Appearance .Watcher .Watch (
63
- this , // Window class
64
- Wpf .Ui .Appearance . BackgroundType .Mica , // Background type
65
- true // Whether to change accents automatically
62
+ Wpf .Ui .Appearance .SystemThemeWatcher .Watch (
63
+ this , // Window class
64
+ Wpf .Ui .Controls . WindowBackdropType .Mica , // Background type
65
+ true // Whether to change accents automatically
66
66
);
67
67
};
68
68
}
You can’t perform that action at this time.
0 commit comments