microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
Icon on MenuFlyoutItem within a dark container turns black on pointer exit (with OS in light mode theme color)
Steps to reproduce the bug
- Clone or download https://github.com/lyahdav/CppWinRtUwpSandbox
- Run solution https://github.com/lyahdav/CppWinRtUwpSandbox/blob/main/cppwinrt/Calendar.sln
- Click MenuFlyout button
- Hover over the 2nd menu item and then hover away from it
Expected behavior Icon for the menu item stays white. Instead it changes to black.
Screenshots
https://user-images.githubusercontent.com/359157/124684321-b002fd00-de83-11eb-91cb-c3d780cf5215.mov
Version Info Windows 10 21H1 / 19043.928 Islands
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Xbox | |
Surface Hub | |
IoT |
Additional context The relevant code is here: https://github.com/lyahdav/CppWinRtUwpSandbox/blob/main/SharedContent/cppwinrt/MainPage.cpp#L65-L91. I have two workarounds there as well:
- Reload the icon on PointerExited. This isn't ideal since it flickers.
- Explicitly set
BitmapIcon.Foreground(nullptr)
.