I am writing a WPF application and trying to style the TabItem header ONLY to show a border with background color change when selected. The problem is when I add that style it messes up the style for my TextBlock items in the TabItem. I'm not a WPF / XAML expert. Below is the style I'm using in my TabControl. I am also using MahApps metro stylings. Any ideas would be appreciated.
<TabControl.Resources>
<Style TargetType="TabItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border Name="Border" BorderThickness="1,1,1,0" BorderBrush="Gainsboro" CornerRadius="4,4,0,0" Margin="2,0">
<ContentPresenter x:Name="ContentSite"
VerticalAlignment="Center"
HorizontalAlignment="Center"
ContentSource="Header"
Margin="10,2"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource AccentColorBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TabControl.Resources>
BasedOnfor theStyle?<Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}">- 15ee8f99-57ff-4f92-890c-b56153