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

AccentButtonStyle text invisible in High Contrast when clicking the button #10413

Open
mantaionut opened this issue Feb 5, 2025 · 4 comments
Assignees
Milestone

Comments

@mantaionut
Copy link

mantaionut commented Feb 5, 2025

Description

I've create a button like this
<Button Content="Open RGB Editor" Style="{StaticResource AccentButtonStyle}" Grid.Row="9" Click="OpenPopup_Click"/>
It works fine in dark or light mode but not in HighContrast mode. When in HC mode when pressing the button the text of the button is no longer visible.

Recording.2025-02-05.185603.mp4

Reproduction Steps

  1. Create button with style Style="{StaticResource AccentButtonStyle} and some Content="Some text"
  2. Switch to High contrast mode
  3. Pressing the button the text will no longer be visible.

Expected behavior

Button text is still visible when pressing the button in HighContrast

Actual behavior

Button text is no longer visible when pressing the button in HighContrast

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

.net 9.0.1
Windows 11 x64

Other information

No response

@jaimecbernardo
Copy link

For some additional context, we've hit this issue in this PowerToys PR, when trying to port one of the utilitites from WPF-UI to .NET 9 WPF.
microsoft/PowerToys#37149

@dipeshmsft
Copy link
Member

Thanks @mantaionut @jaimecbernardo for bringing this to our attention. We will take a look at this issue.

@jaimecbernardo
Copy link

Thank you @dipeshmsft ,
I see that this was added to the .NET milestone, so we're applying a workaround for the time being:
microsoft/PowerToys@44691d3

@mantaionut
Copy link
Author

I also noticed another issue. On Windows 10 hc1 and hc2 when hovering over the buttons the text and background are both white.
Image
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants