WPF TabItem Background color when selected?
Any clue on why the code bellow does not work ? I'm trying to set the background color of a tab item when selected to red.
<Style x:Key="TabItemStyle" TargetType="{x:Type TabItem}">
开发者_运维百科 <Setter Property="Background" Value="White"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
Regards, MadSeb
Here is a good WPF tab project covering different aspects of setters and triggers which may assist you. Its kind of cool functionality too :)
http://www.dotnetspark.com/kb/1867-create-tab-control-wpf.aspx
精彩评论