maui
maui copied to clipboard
[Windows] Shell TitleColor changes not only the color of the title, but also the color of the secondary ToolbarItem's titles
Description
I was trying to change the styles of the Shell. I wanted the text to be white with a coloured background. But when I did that, I wasn't able to read the secondary menu items text because they were also white but with a white background.
An example of what I mean:
You are only able to read them, when the user move the mouse over the options.
It would be ideal to have different properties in the Styles.xaml for this two different texts.
Steps to Reproduce
- Create a new project
- Modify the Styles.xaml by changing the Shell.TitleColor to White and Shell.BackgroundColor to some other color
- Add at least one ToolbarItem to the Shell.Current.ToolbarItems list. The ToolbarItem must have a Text and the Order property have to be ToolbarItemOrder.Secondary.
- Run the project in Windows emulator.
Link to public reproduction project repository
https://github.com/nicop85/TestMenuItemsWinUI.git
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
The workaround I found is to override the Shell.TitleView in all of my pages to be able to use a white colour and leaving the property Shell.TitleColor of the Styles.xaml with a black value.
Relevant log output
No response
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Verified this on VS 17.10.0 Preview 1.0(8.0.6). Repro on Windows 11, not repro on Android 14.0-API34 with below Project: TestMenuItemsWinUI.zip