You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -37,16 +37,16 @@ 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
47
47
### Automatic change
48
48
49
-
The theme can be changed automatically when the operating system changes its background or accent using the [Watcher](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Appearance/Watcher.cs) class.
49
+
The theme can be changed automatically when the operating system changes its background or accent using the [SystemThemeWatcher](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Appearance/SystemThemeWatcher.cs) class.
50
50
51
51
```csharp
52
52
namespaceMyApp;
@@ -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
0 commit comments