11,579 questions
How to change foreground color on selected tabitem?
Takeshi
41
Reputation points
Hi all,
I have styled everything but foreground of selected file ... it doesnt work ... can you help me, PLEASE?
so my code ...
App.xaml
<Style TargetType="{x:Type TabItem}" x:Key="TabItemStyle">
<Setter Property="Background" Value="#1d4f73" />
<Setter Property="Foreground" Value="#fff" />
<Setter Property="Padding" Value="20,10" />
<Setter Property="FontSize" Value="14" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="#000" /> ... this doesnt work
</Trigger>
</Style.Triggers>
</Style>
SomePage.xaml
<TabControl BorderThickness="0,3,0,0" FontSize="18">
<TabItem Name="name" Header="SomeHeader" Style="{StaticResource TabItemStyle}">
</TabItem>
</TabControl>
Developer technologies | C#
Sign in to answer