maui icon indicating copy to clipboard operation
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

Open nicop85 opened this issue 6 months ago • 1 comments

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:

Captura de pantalla 2024-01-26 121400

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

  1. Create a new project
  2. Modify the Styles.xaml by changing the Shell.TitleColor to White and Shell.BackgroundColor to some other color
  3. 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.
  4. 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

nicop85 avatar Jan 26 '24 15:01 nicop85

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.

ghost avatar Jan 26 '24 15:01 ghost

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

XamlTest avatar Mar 07 '24 09:03 XamlTest