You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you change a MenuFlyoutItem's state to disabled inside the menu item's ICommand.Execute() implementation by calling it's ICommand.CanExecuteChanged.Invoke() method, while the app's theme is dark and the default system theme is light, the next time it's containing menu is opened the MenuFlyoutItem text is drawn with a black foreground, irrelevant of it's style.
Steps to reproduce the bug
Run the attached project with the system theme set to light.
Click the toggle theme button.
Open the Demo menu.
Note that the last MenuFlyoutItem is current enabled.
The only work arround I have found is to delay calling Invoke() so that it's not called from within the Execute() method. For example in the repro project:
Describe the bug
If you change a MenuFlyoutItem's state to disabled inside the menu item's ICommand.Execute() implementation by calling it's ICommand.CanExecuteChanged.Invoke() method, while the app's theme is dark and the default system theme is light, the next time it's containing menu is opened the MenuFlyoutItem text is drawn with a black foreground, irrelevant of it's style.
Steps to reproduce the bug
Min repro project:
MenuFlyoutItem_Issue.zip
Expected behavior
No response
Screenshots
Recording.2023-09-20.155109.mp4
NuGet package version
None
Windows version
Windows 11 (22H2): Build 22621
Additional context
This bug is in 1.4.1 and 1.4.0 releases.
The only work arround I have found is to delay calling Invoke() so that it's not called from within the Execute() method. For example in the repro project:
The text was updated successfully, but these errors were encountered: