Skip to content

Commit

Permalink
Merge pull request #1080 from jonmotos/patch-1
Browse files Browse the repository at this point in the history
Update themes.md documentation for 3.x namespace and type name changes
  • Loading branch information
pomianowski committed May 12, 2024
2 parents ef742b5 + 5b92450 commit 22c4dc1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/documentation/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ Or, you can add **WPF UI** resources manually.
If you want to change the theme while the application is running, you can call the static `Apply` method of the `Theme` class.

```csharp
Wpf.Ui.Appearance.Theme.Apply(
Wpf.Ui.Appearance.ThemeType.Light, // Theme type
Wpf.Ui.Appearance.BackgroundType.Mica, // Background type
true // Whether to change accents automatically
Wpf.Ui.Appearance.ApplicationThemeManager.Apply(
Wpf.Ui.Appearance.ApplicationTheme.Light, // Theme type
Wpf.Ui.Controls.WindowBackdropType.Mica, // Background type
true // Whether to change accents automatically
);
```

Expand All @@ -59,10 +59,10 @@ public partial class MainWindow : Window

Loaded += (sender, args) =>
{
Wpf.Ui.Appearance.Watcher.Watch(
this, // Window class
Wpf.Ui.Appearance.BackgroundType.Mica, // Background type
true // Whether to change accents automatically
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(
this, // Window class
Wpf.Ui.Controls.WindowBackdropType.Mica, // Background type
true // Whether to change accents automatically
);
};
}
Expand Down

0 comments on commit 22c4dc1

Please sign in to comment.