TabStrip TabItem:selected style does not take effect #17939
Replies: 2 comments 1 reply
-
You're somehow putting Avalonia/src/Avalonia.Themes.Fluent/Controls/TabStripItem.xaml Lines 57 to 60 in 7aff154 |
Beta Was this translation helpful? Give feedback.
-
I wrote this based on the examples in the documentation, as shown in the image below, and the address is:https://docs.avaloniaui.net/docs/reference/controls/tabstrip Is it because the documentation version is old and there have been changes in the new version? If I use TabStripItem in my code, it prompts an error. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
The Avalonia version is 11.2.3.
I used a control called TabStrip, and to change the font color of the selected item, I customized a style file, but found it ineffective. See the animated GIF below for reference:
When switching to the TabControl control, similar style code works fine. See the animated GIF below for reference:
To find the cause, I tried running it to see the tree structure and found that TabStrip contains TabItem and TabStripItem, while TabStripItem also contains TabItem. After directly modifying the TextElement.Foreground of TabItem in TabStripItem, it took effect.
I am not sure if this is a bug or if there is an issue with my style setting. If it's my own problem, I apologize.
To Reproduce
Using the TabStrip control and setting the style to change the color when selected.
Expected behavior
No response
Avalonia version
11.2.3
OS
Windows
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions