tags:

views:

13

answers:

1

Hi,

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

A: 

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

halfevil