<pre lang="xml"><Style TargetType="{x:Type TabItem}" x:Key="TabItemStyle"> <Style.Triggers> <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=TabItem}}" Value="True"> <Setter Property="Background" > <Setter.Value> <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"> <GradientStop Color="LightBlue" Offset="0" /> <GradientStop Color="BlanchedAlmond" Offset="1" /> <GradientStop Color="#A50000C9" Offset="0.376" /> <GradientStop Offset="0.848" /> </LinearGradientBrush> </Setter.Value> </Setter> <Setter Property="FontSize" Value="18" /> </DataTrigger> <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=TabItem}}" Value="False"> <Setter Property="Background" > <Setter.Value> <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"> <GradientStop Color="LightGray" Offset="0" /> <GradientStop Color="DarkOrange" Offset="1" /> <GradientStop Color="#A50000C9" Offset="0.376" /> <GradientStop Offset="0.848" /> </LinearGradientBrush> </Setter.Value> </Setter> <Setter Property="FontSize" Value="14" /> </DataTrigger> </Style.Triggers> </Style> <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource TabItemStyle}"></Style>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)