-
Notifications
You must be signed in to change notification settings - Fork 674
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
MenuFlyout does not update correctly on theme change #8077
Comments
We were able to repro this simple case, looks like a theming issue on the background, thanks for filing. |
@gabbybilka I'm also hitting this with a Flyout with custom content. It seems that if the flyout isn't shown prior to the theme change it works correctly, but after, the style seems to be cached. Is there a workaround until this is fixed to notify the flyout to recreate the content or update its style references? |
This also affects content dialogs. |
Based on my testing this issue seems to be fixed with latest 1.4.3 version of Windows App SDK. |
A fix for this was checked in for WinAppSDK 1.6, and was included in 1.6-experimental1. |
Describe the bug
Changing the system theme from Light to Dark or from Dark to Light will not update the Theme of a MenuFlyout on runtime like the rest of the controls.
This happens also in WinUI 3 Gallery app, but randomly, as I can't reproduce it everytime. On my app, on the otherhand, I can reproduce it everytime.
The only way it will display the correct theme is to reopen the app.
It might also be related to #3373 which was for WinUI 2.
Steps to reproduce the bug
Open the MenuFlyout.
Step 3 is important, because if you don't open it first, and you change the theme, then open, the correct theme will be applied.
Change the system theme from the Settings App > Personalization > Colors : Chose Color Mode - Light or Dark
Open the MenuFlyout.
Observe the strange color state of the Flyout, it's not Light or Dark theme, more of a broken dimmed or washed out state.
Expected behavior
The Flyout should display the correct theme based on what theme was selected by the OS at runtime, without the need to reopen the app or to not open the MenuFlyout first.
Screenshots
Light Theme normal state
Light Theme switched state
Dark Theme normal state
Dark Theme switched state
NuGet package version
WinUI 3 - Windows App SDK 1.2.2: 1.2.221209.1
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: