microsoft/microsoft-ui-xaml

Icon on MenuFlyoutItem within a dark container turns black on pointer exit (with OS in light mode theme color)

Open

#5,381 建立於 2021年7月7日

在 GitHub 查看
 (10 留言) (0 反應) (0 負責人)C# (5,815 star) (659 fork)batch import
area-Menusbughelp wantedreact-native-windowsteam-Controls

描述

Steps to reproduce the bug

  1. Clone or download https://github.com/lyahdav/CppWinRtUwpSandbox
  2. Run solution https://github.com/lyahdav/CppWinRtUwpSandbox/blob/main/cppwinrt/Calendar.sln
  3. Click MenuFlyout button
  4. 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:

  1. Reload the icon on PointerExited. This isn't ideal since it flickers.
  2. Explicitly set BitmapIcon.Foreground(nullptr).

貢獻者指南