-
-
Notifications
You must be signed in to change notification settings - Fork 948
Theme switching doesn't work properly #1193
Copy link
Copy link
Open
Labels
⭐ top bugTop bug.Top bug.⭐ top issueTop issue.Top issue.bugSomething isn't workingSomething isn't working
Description
Describe the bug
Hello, I am trying to implement a dark theme into my application, but trying to switch themes causes some weird behavior (see clip).
Page.cs:
private async void OnLightThemeRadioButtonChecked(object sender, RoutedEventArgs e)
{
Wpf.Ui.Appearance.ApplicationThemeManager.Apply(Wpf.Ui.Appearance.ApplicationTheme.Light);
}
private async void OnDarkThemeRadioButtonChecked(object sender, RoutedEventArgs e)
{
Wpf.Ui.Appearance.ApplicationThemeManager.Apply(Wpf.Ui.Appearance.ApplicationTheme.Dark);
}
MainWindow.cs:
public MainWindow()
{
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this);
InitializeComponent();
}
To Reproduce
Switch themes with Wpf.Ui.Appearance.ApplicationThemeManager.Apply()
Expected behavior
I would expect the themes to simply switch like in the demo app.
Screenshots
clip.mp4
OS version
Windows 11 23H2 (Build 22631.3958)
.NET version
.Net 8.0
WPF-UI NuGet version
3.0.5
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
⭐ top bugTop bug.Top bug.⭐ top issueTop issue.Top issue.bugSomething isn't workingSomething isn't working