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 aberto em 7 de jul. de 2021

Ver no GitHub
 (11 comments) (0 reactions) (0 assignees)C# (659 forks)batch import
area-Menusbughelp wantedneeds-triagereact-native-windowsteam-Controls

Métricas do repositório

Stars
 (5.815 stars)
Métricas de merge de PR
 (Mesclagem média 5d 15h) (9 fundiu PRs em 30d)

Description

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).

Guia do colaborador