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

Respect BarTextColor in Windows MenuBar #6964

Merged
merged 3 commits into from
May 9, 2022

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented May 9, 2022

Windows MauiToolbar is not respecting the BarTextColor in the MenuBar. Currently, BarTextColor is only setting the Title's Foreground. If someone sets the BarBackgroundColor, and the BarTextColor is ignored, you can get a menu bar that is not readable.

The fix is to propagate the BarTextColor to the MenuBar. However, the fix isn't as simple due to microsoft/microsoft-ui-xaml#7070. Working around that issue by setting the Button's Foreground colors in the MenuBar's ResourceDictionary.

Fix #5554

Windows MauiToolbar is not respecting the BarTextColor in the MenuBar. Currently, BarTextColor is only setting the Title's Foreground. If someone sets the BarBackgroundColor, and the BarTextColor is ignored, you can get a menu bar that is not readable.

The fix is to propagate the BarTextColor to the MenuBar. However, the fix isn't as simple due to microsoft/microsoft-ui-xaml#7070. Working around that issue by setting the Button's Foreground colors in the MenuBar's ResourceDictionary.

Fix dotnet#5554
@Eilon Eilon added area-controls-menubar Desktop MenuBarItems legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 9, 2022
@Redth Redth added this to the 6.0.300 milestone May 9, 2022
- Allow for clearing the MenuBar Foreground property.
- Ensure that we only set the foreground if someone actually set the BarTextColor.
@PureWeen PureWeen enabled auto-merge (squash) May 9, 2022 23:08
@PureWeen PureWeen merged commit adfbdb0 into dotnet:main May 9, 2022
@eerhardt eerhardt deleted the FixMenuBarItemTextColor branch May 10, 2022 18:17
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing TextColor in MenuBar
6 participants