<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Colors.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type TabControl}" x:Key="TabControlStyle">
        <Style.Resources>
            <Style TargetType="{x:Type TabItem}">
                <Setter Property="Background" Value="{StaticResource Background}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TabItem}">
                            <Grid x:Name="iHeaderGrid" Background="{TemplateBinding Background}" SnapsToDevicePixels="true" Height="23">
                                <ContentPresenter x:Name="iHeader" ContentSource="Header" Margin="10,0,10,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsSelected" Value="true">
                                    <Setter Property="Background" Value="{StaticResource Accent_Color}"/>
                                    <Setter Property="TextBlock.Foreground" Value="{StaticResource Background}" TargetName="iHeader"/>
                                </Trigger>
                                <Trigger Property="IsSelected" Value="false">
                                    <Setter Property="Background" Value="{StaticResource Background}" />
                                    <Setter Property="TextBlock.Foreground" Value="{StaticResource Accent_Color}" TargetName="iHeader"/>
                                </Trigger>
                                <Trigger Property="IsMouseOver" Value="true" SourceName="iHeaderGrid">
                                    <Setter Property="Cursor" Value="Hand" TargetName="iHeader" />
                                </Trigger>
                                <Trigger Property="IsMouseOver" Value="false" SourceName="iHeaderGrid">
                                    <Setter Property="Cursor" Value="Arrow" TargetName="iHeader" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Style.Resources>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid KeyboardNavigation.TabNavigation="Local">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border Background="Transparent" BorderThickness="0,0,0,2" 
                                BorderBrush="{StaticResource BackgroundSelected}">
                            <TabPanel Name="HeaderPanel" Panel.ZIndex="1" IsItemsHost="True" KeyboardNavigation.TabIndex="1"/>
                        </Border>
                        <Border Grid.Row="1" Background="{StaticResource Background}"/>
                        <ContentPresenter Grid.Row="1" Name="PART_SelectedContentHost" 
                                          ContentSource="SelectedContent"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>