-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
TabBar / Tab colours not working correctly on Windows #12386
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
I have the same problem. Tabs on Windows do not look right because the Selected color cannot be set. |
I've updated the description on this issue with a workaround for NET7 |
Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you! |
Suggested workaround does not appear to work for me on NET7. Does not affect Text colour. Only tab background. Looks like current fix in only NET8 currently. Do we have any suggested workaround that will work on NET7 for TabItem Text Color? |
Workaround in description has been updated and I can confirm it works for me in NET7. |
FYI Fixed confirm in .NET8. However there remains an edge case for the workaround in .NET where tab icon images are initialised to black even when foreground color is set to white. This only occurs when Windows Theme is in Light Mode. |
Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you! |
As an interim workaround, you could explore using an
|
I confirm that this workaround works |
Description
When trying to set the Shell.TabBarForegroundColor or Shell.TabBarUnselectedColor on a TabBar (or Tab) it does not work. In the example shown, the foreground color should be Green but it is still showing as Black and the unselected tab should be Red, but it is showing as Green.
There is no option for Selected tab.
All default styling has been removed in this example by commenting it out.
Steps to Reproduce
Expected outcome: Foreground text color of any TabBar tabs will be the set color
Actual outcome: Foreground text color of each Tab always remains black.
Also tested by setting the property on the Tab element but still the same result.
Link to public reproduction project repository
https://github.com/samuelradford/TabBarColorTest.App
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows SDK 10.0.19041.0
Did you find any workaround?
The tabs are generated from a WinUI template so if you need to workaround this before NET8 you can just replace the template here with your own template.
For example I've added this
Into the Platform/Windows/App.xaml file.
At this point you could use all the methods you'd use with WinUI to customize values. Generate the ControlTemplate and then modify the VisualState etc.. as needed.
You can get the
ControlTemplates
from hereRelevant log output
No response
The text was updated successfully, but these errors were encountered: