-
-
Notifications
You must be signed in to change notification settings - Fork 772
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
Dark Theme Flickering To Light Theme Randomly #1267
Comments
I captured some of the output below; you can see the system is attempting to set to light theme several times in a row without user input. Microsoft.Hosting.Lifetime: Information: Application started. Press Ctrl+C to shut down. |
I set a breakpoint on the OnThemeChanged under the TitleBar in Wpf.Ui./ Wpf.Ui.Controls.TitleBar It happens in this highest part of the call stack:
|
I realize this may be a function of wanting the SystemThemeWatcher to watch for the system theme and then update. When this isn't made clear, this appears as a theme flickering bug. I think the solution would be to; if this is enabled, prevent the ability to switch to something other than the system theme. Otherwise, this is a hidden behavior. |
I have the same issue with WPF-UI 3.0.0 to 3.0.5. One sure way to reproduce this issue is by locking your session (Win+L), and then log in back. |
Describe the bug
Application Dark Theme flickering to Light Theme
To Reproduce
This is very difficult to reproduce, but effectively, I start the gallery sample application and switch to dark mode. After some time, or after triggering something on another widow, the application's theme will switch back to light mode. I am unable to consistently reproduce the bug, but after clicking on the "All samples" and mousing over the "Home" navigator it occurred. However, this doesn't happen consistently. And it seems to be triggered by other various events.
Expected behavior
I expect to simply click on dark mode and have the application remain on dark mode until I click on the button that triggers the SwitchThemes function.
Screenshots
No response
OS version
Windows 10 Enterprise
.NET version
8.0
WPF-UI NuGet version
main branch under the gallery:
4.0.0-rc.2
Additional context
Unfortunately this is very difficult to reproduce! I wish I could pinpoint the cause of what causes the theme flicker. Identifying the cause will likely lead to a clear fix. I suspect this is some resource failing to load.
The text was updated successfully, but these errors were encountered: