AppTheme behaving incorrectly in flyout menu #17922
Labels
area-xaml
XAML, CSS, Triggers, Behaviors
platform/windows 🪟
s/triaged
Issue has been reviewed
s/try-latest-version
Please try to reproduce the potential issue on the latest public version
t/bug
Something isn't working
Description
Hello,
a couple of days of trying to solve this has lead me to believe this requires a bugfix.
The problem arise when changing the theme inside of the Maui-app. The problem is not general to every component of the app, but specifically to the flyout menu. The background of a button will not be changed to the correct AppThemeBinding color when the theme is changed locally in the app, but the color of the button will keep the same theme-color as Windows (Light/Dark) was set to when the app was booted.
Another issue is the flyout menu stretching into the titlebar area when changing the background color of flyout menu. At app boot, the flyout menu background color is either white or black depending on Windows theme, and not the color set using "FlyoutBackgroundColor". Changing the background color live to a different color does change the color of the flyout menu, but also extends the flyout menu to the titlebar area.
I have created a repo to help you understand the problem better, feel free to test it yourself. This is very strange, especially when hover-effect using Visualstate works fine with Apptheme bindings for the buttons in question.
Steps to Reproduce
Background color of a button in flyout menu;
Darkmode: Orange
Lightmode: Green
Change the apptheme (Windows set to Darkmode).
Expected result:
Actual result:
Change Windows theme to light (Apptheme is now light)
Expected result:
Actual result:
Link to public reproduction project repository
https://github.com/davidvalle1/AppThemeBug
Version with bug
7.0.92
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows SDK 10.0.19041.0
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: