<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="../Brushes/DefaultColorTheme.xaml" />
        <ResourceDictionary Source="../BaseControlStyles/CheckBoxStyle.xaml" />
        <ResourceDictionary Source="../Icons/CheckBoxUncheckedIconStyle.xaml" />
        <ResourceDictionary Source="../Icons/CheckBoxCheckedIconStyle.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="BlueCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource CheckBoxNormal}">
        <Setter Property="Foreground" Value="{StaticResource ButtonNormalForegroundBrush}" />
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <Border x:Name="topControl" Background="Transparent" Padding="4">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock x:Name="CheckBoxUnchecked"
                                       Style="{StaticResource CheckBoxUncheckedIcon}"
                                       HorizontalAlignment="Center"
                                       VerticalAlignment="Center"
                                       Visibility="Visible" />
                            <TextBlock x:Name="CheckBoxChecked"
                                       Style="{StaticResource CheckBoxCheckedIcon}"
                                       HorizontalAlignment="Center"
                                       VerticalAlignment="Center"
                                       Visibility="Collapsed" />
                            <ContentPresenter Margin="4,0,0,0"
                                              VerticalAlignment="Center"
                                              HorizontalAlignment="Left"
                                              RecognizesAccessKey="True" />
                        </StackPanel>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed">
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckBoxChecked">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckBoxUnchecked">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked" />
                                <VisualState x:Name="Indeterminate" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="topControl" Property="Background" Value="{StaticResource ButtonNormalForegroundBrush}" />
                            <Setter Property="Foreground" Value="{StaticResource ButtonNormalBorderBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
