Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme switching doesn't work properly #1193

Open
JellyBelly1809 opened this issue Aug 9, 2024 · 0 comments
Open

Theme switching doesn't work properly #1193

JellyBelly1809 opened this issue Aug 9, 2024 · 0 comments
Labels
bug Something isn't working ⭐ top bug Top bug. ⭐ top issue Top issue.

Comments

@JellyBelly1809
Copy link

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

@JellyBelly1809 JellyBelly1809 added the bug Something isn't working label Aug 9, 2024
@github-actions github-actions bot added the ⭐ top bug Top bug. label Jan 30, 2025
@github-actions github-actions bot added the ⭐ top issue Top issue. label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ⭐ top bug Top bug. ⭐ top issue Top issue.
Projects
None yet
Development

No branches or pull requests

1 participant