Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MenuFlyoutItem icon's foreground doesn't change back to resting color #9690

Open
eduardobragaxz opened this issue Jun 3, 2024 · 6 comments
Labels
area-Menus bug Something isn't working team-Controls Issue for the Controls team

Comments

@eduardobragaxz
Copy link

Describe the bug

If you change the foreground of a MenuFlyoutItem and then hover over it, the color won't return for the icon once the pointer goes away.

Steps to reproduce the bug

Create a project with a MenuFlyoutItem and change it's foreground.

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.5.3: 1.5.240428000

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

@eduardobragaxz eduardobragaxz added the bug Something isn't working label Jun 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jun 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@codendone codendone added area-Menus team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jun 13, 2024
@codendone
Copy link
Contributor

How are you changing the foreground on the MenuFlyoutItem? If you set the Foreground property directly on the element, this will override any values being set from style.

@eduardobragaxz
Copy link
Author

Yeah I just change the Foreground on the MenuFlyoutItem. If I hover the mouse the text and icon will change to white/black, and when I move the mouse away only the text reverts to the color I set. The icon remains white/black.

@eduardobragaxz
Copy link
Author

MenuFlyoutItemIcons.mp4

You can see the very fist AppBarButton that is blue works correctly, but the two MenuFlyoutItems don't.

@codendone
Copy link
Contributor

Thanks for clarifying!

@kmahone
Copy link
Member

kmahone commented Jul 15, 2024

I think this is a similar root cause to #7208.

In the default template, the TextBlock has Foreground="{TemplateBinding Foreground}", however the ContentPresenter for the Icon has no Foreground set. So when transitioning away from the PointerOver state, the icon foreground does not revert back to what it was previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Menus bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

3 participants