<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls" xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls" xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls" xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls" xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:telerikTransitions="clr-namespace:Telerik.Windows.Controls.TransitionEffects;assembly=Telerik.Windows.Controls" xmlns:telerikTransitonControl="clr-namespace:Telerik.Windows.Controls.TransitionControl;assembly=Telerik.Windows.Controls" xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls" xmlns:filteringEditors="clr-namespace:Telerik.Windows.Controls.Filtering.Editors;assembly=Telerik.Windows.Controls" xmlns:telerikShapes="clr-namespace:Telerik.Windows.Shapes;assembly=Telerik.Windows.Controls" xmlns:transitionControl="clr-namespace:Telerik.Windows.Controls.TransitionControl;assembly=Telerik.Windows.Controls">
  <!--  Brushes-->
  <LinearGradientBrush x:Key="ControlOuterBorder_Normal" EndPoint="0.971000015735626,0.5" StartPoint="0.0399999991059303,0.5">
    <GradientStop Color="#FF707070" Offset="0" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
    <GradientStop Color="#FF707070" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlBackground_Normal" Color="#FF575859" />
  <SolidColorBrush x:Key="ControlForeground_Normal" Color="#FFDDDDDD" />
  <LinearGradientBrush x:Key="ControlOuterBorder_MouseOver" EndPoint="0.971000015735626,0.5" StartPoint="0.0399999991059303,0.5">
    <GradientStop Color="#FFB0B0B0" Offset="0" />
    <GradientStop Color="#FFB0B0B0" Offset="1" />
    <GradientStop Color="#FFE0E1E2" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlBackground_MouseOver" Color="#FF878787" />
  <SolidColorBrush x:Key="ControlOuterBorder_Pressed" Color="#FF1A1A1A" />
  <LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF2E2D2D" Offset="0" />
    <GradientStop Color="#FF424242" Offset="1" />
    <GradientStop Color="#FF424242" Offset="0.14" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlForeground_Pressed" Color="#FFC5C2C2" />
  <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FF5D5C5C" />
  <SolidColorBrush x:Key="ControlBackground_Disabled" Color="#FF666666" />
  <CornerRadius x:Key="ControlOuterBorder_CornerRadius">3</CornerRadius>
  <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF789FC3" />
  <LinearGradientBrush x:Key="CoreButtonOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF8E8165" Offset="0" />
    <GradientStop Color="#FFC6C0B2" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="CheckBoxBackground_Disabled" Color="#FF666666" />
  <SolidColorBrush x:Key="CheckBoxBorder_Disabled" Color="#FF5D5C5C" />
  <SolidColorBrush x:Key="CheckBoxTick_Disabled" Color="#FF868686" />
  <SolidColorBrush x:Key="CheckBoxTick_MouseOver" Color="#FF262626" />
  <LinearGradientBrush x:Key="CheckBoxBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF616060" Offset="0" />
    <GradientStop Color="#FFCDCDCD" Offset="1" />
    <GradientStop Color="#FFCDCDCD" Offset="0.14" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="CheckBoxBorder_Pressed" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FF595959" Offset="0" />
    <GradientStop Color="#FF595959" Offset="1" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="CheckBoxBackground_MouseOver" Color="#FF878787" />
  <LinearGradientBrush x:Key="CheckBoxBorder_MouseOver" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FFB0B0B0" Offset="0" />
    <GradientStop Color="#FFB0B0B0" Offset="1" />
    <GradientStop Color="#FFE0E1E2" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="CheckBoxBorder_Focused" Color="#FF789FC3" />
  <SolidColorBrush x:Key="CheckBoxTick" Color="#FFDDDDDD" />
  <LinearGradientBrush x:Key="CheckBoxBorder" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FF707070" Offset="0" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
    <GradientStop Color="#FF707070" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="CheckBoxBackground" Color="#FF575859" />
  <SolidColorBrush x:Key="CheckBoxForeground" Color="#FFDDDDDD" />
  <SolidColorBrush x:Key="TextBoxBackground" Color="#FF333333" />
  <SolidColorBrush x:Key="TextBoxBackground_ReadOnly" Color="#5EC9C9C9" />
  <SolidColorBrush x:Key="ControlBackground" Color="#FF3D3D3D" />
  <SolidColorBrush x:Key="ControlOuterBorder" Color="#FF595959" />
  <SolidColorBrush x:Key="ControlForeground_MouseOver" Color="#FF262626" />
  <SolidColorBrush x:Key="ControlForeground_Active" Color="#FF262626" />
  <CornerRadius x:Key="ControlSubItem_OuterCornerRadius">0</CornerRadius>
  <SolidColorBrush x:Key="ControlSubItem_Background_MouseOver" Color="#FF878787" />
  <LinearGradientBrush x:Key="ControlSubItem_Background_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF616060" Offset="0" />
    <GradientStop Color="#FFCDCDCD" Offset="1" />
    <GradientStop Color="#FFCDCDCD" Offset="0.14" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ToolTip_OuterBorder" Color="#FF595959" />
  <SolidColorBrush x:Key="ToolTip_Background" Color="#FF3D3D3D" />
  <SolidColorBrush x:Key="ToolTip_Foreground" Color="#FFDDDDDD" />
  <SolidColorBrush x:Key="ToolTip_InnerBorder" Color="Transparent" />
  <!-- System.Windows.Button-->
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="3" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusState" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" />
            <ContentControl x:Name="ContentElement" IsTabStop="False" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            <!-- Focus -->
            <Border BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Opacity="0" x:Name="FocusState" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="OpacityMask" Value="{StaticResource CoreButtonOuterBorder_Pressed}" />
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}" />
  <!-- System.Windows.ScrollViewer-->
  <SolidColorBrush x:Key="ScrollBarBackground" Color="#FF3D3D3D" />
  <SolidColorBrush x:Key="ScrollButton" Color="#FF808080" />
  <SolidColorBrush x:Key="ScrollButton_MouseOver" Color="#FFAAAAAA" />
  <SolidColorBrush x:Key="ScrollButton_Pressed" Color="#FFCDCDCD" />
  <ControlTemplate x:Key="ScrollThumbTemplate" TargetType="Thumb">
    <Border Background="Transparent">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="ButtonIcon" CornerRadius="3" Margin="{TemplateBinding Padding}" Background="{StaticResource ScrollButton}" />
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="LargeStepButtonTemplate" TargetType="RepeatButton">
    <Rectangle Fill="Transparent" />
  </ControlTemplate>
  <ControlTemplate x:Key="HorizontalSmallIncreaseTemplate" TargetType="RepeatButton">
    <Border Background="Transparent" Padding="{TemplateBinding Padding}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation To="0.27" Duration="0" Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Opacity" />
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Path x:Name="ButtonIcon" Data="M0,0 L6,3.5 0,7Z" Fill="{StaticResource ScrollButton}" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="None" />
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="HorizontalSmallDecreaseTemplate" TargetType="RepeatButton">
    <Border Background="Transparent" Padding="{TemplateBinding Padding}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation To="0.27" Duration="0" Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Opacity" />
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Path x:Name="ButtonIcon" Data="M6,0 L0,3.5 6,7Z" Fill="{StaticResource ScrollButton}" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="None" />
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="VerticalSmallDecreaseTemplate" TargetType="RepeatButton">
    <Border Background="Transparent" Padding="{TemplateBinding Padding}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation To="0.27" Duration="0" Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Opacity" />
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Path x:Name="ButtonIcon" Data="M0,6 L3.5,0 7,6Z" Fill="{StaticResource ScrollButton}" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="None" />
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="VerticalSmallIncreaseTemplate" TargetType="RepeatButton">
    <Border Background="Transparent" Padding="{TemplateBinding Padding}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation To="0.27" Duration="0" Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Opacity" />
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Path x:Name="ButtonIcon" Data="M0,0 L3.5,6 7,0Z" Fill="{StaticResource ScrollButton}" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="None" />
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="HorizontalScrollBarControlTemplate" TargetType="ScrollBar">
    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <RepeatButton x:Name="HorizontalSmallDecrease" Grid.Column="0" Template="{StaticResource HorizontalSmallDecreaseTemplate}" Padding="0 0 0 2" IsTabStop="False" Interval="50" Width="18" Command="{x:Static ScrollBar.LineLeftCommand}" />
        <Track x:Name="PART_Track" Grid.Column="1">
          <Track.DecreaseRepeatButton>
            <RepeatButton x:Name="HorizontalLargeDecrease" Template="{StaticResource LargeStepButtonTemplate}" IsTabStop="False" Interval="50" Command="{x:Static ScrollBar.PageLeftCommand}" />
          </Track.DecreaseRepeatButton>
          <Track.IncreaseRepeatButton>
            <RepeatButton x:Name="HorizontalLargeIncrease" Template="{StaticResource LargeStepButtonTemplate}" IsTabStop="False" Interval="50" Command="{x:Static ScrollBar.PageRightCommand}" />
          </Track.IncreaseRepeatButton>
          <Track.Thumb>
            <Thumb x:Name="HorizontalThumb" Padding="0 5 0 6" Template="{StaticResource ScrollThumbTemplate}" />
          </Track.Thumb>
        </Track>
        <RepeatButton x:Name="HorizontalSmallIncrease" Grid.Column="2" Template="{StaticResource HorizontalSmallIncreaseTemplate}" Padding="0 0 0 2" IsTabStop="False" Interval="50" Width="18" Command="{x:Static ScrollBar.LineRightCommand}" />
      </Grid>
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="VerticalScrollBarControlTemplate" TargetType="ScrollBar">
    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto" />
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <RepeatButton x:Name="VerticalSmallDecrease" Grid.Row="0" Template="{StaticResource VerticalSmallDecreaseTemplate}" Padding="0 0 2 0" Height="18" IsTabStop="False" Interval="50" Command="{x:Static ScrollBar.LineUpCommand}" />
        <Track x:Name="PART_Track" IsDirectionReversed="true" Grid.Row="1">
          <Track.DecreaseRepeatButton>
            <RepeatButton x:Name="VerticalLargeDecrease" Template="{StaticResource LargeStepButtonTemplate}" IsTabStop="False" Interval="50" Command="{x:Static ScrollBar.PageUpCommand}" />
          </Track.DecreaseRepeatButton>
          <Track.IncreaseRepeatButton>
            <RepeatButton x:Name="VerticalLargeIncrease" Template="{StaticResource LargeStepButtonTemplate}" IsTabStop="False" Interval="50" Command="{x:Static ScrollBar.PageDownCommand}" />
          </Track.IncreaseRepeatButton>
          <Track.Thumb>
            <Thumb x:Name="VerticalThumb" Padding="5 0 6 0" Template="{StaticResource ScrollThumbTemplate}" />
          </Track.Thumb>
        </Track>
        <RepeatButton x:Name="VerticalSmallIncrease" Grid.Row="2" Template="{StaticResource VerticalSmallIncreaseTemplate}" Padding="0 0 2 0" Height="18" IsTabStop="False" Interval="50" Command="{x:Static ScrollBar.LineDownCommand}" />
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="ScrollBarStyle" TargetType="ScrollBar">
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Width" Value="18" />
    <Setter Property="Height" Value="Auto" />
    <Setter Property="Background" Value="{StaticResource ScrollBarBackground}" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="Template" Value="{StaticResource VerticalScrollBarControlTemplate}" />
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Width" Value="Auto" />
        <Setter Property="Height" Value="18" />
        <Setter Property="Template" Value="{StaticResource HorizontalScrollBarControlTemplate}" />
      </Trigger>
    </Style.Triggers>
  </Style>
  <ControlTemplate x:Key="ScrollViewerControlTemplate" TargetType="ScrollViewer">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" />
        <Rectangle Grid.Column="1" Fill="{StaticResource ScrollBarBackground}" Grid.Row="1" />
        <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="1" IsTabStop="False" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Orientation="Vertical" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{TemplateBinding VerticalOffset}" ViewportSize="{TemplateBinding ViewportHeight}" Style="{StaticResource ScrollBarStyle}" />
        <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="0" IsTabStop="False" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{TemplateBinding HorizontalOffset}" ViewportSize="{TemplateBinding ViewportWidth}" Style="{StaticResource ScrollBarStyle}" />
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="ScrollViewerStyle" TargetType="ScrollViewer">
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="Template" Value="{StaticResource ScrollViewerControlTemplate}" />
  </Style>
  <Style BasedOn="{StaticResource ScrollBarStyle}" TargetType="ScrollBar" />
  <Style BasedOn="{StaticResource ScrollViewerStyle}" TargetType="ScrollViewer" />
  <!-- System.Windows.CheckBox-->
  <ControlTemplate x:Key="CheckBoxControlTemplate" TargetType="CheckBox">
    <Grid Background="Transparent">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="IndeterminateVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckedVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentVisual" />
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual" />
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Stroke">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateVisual" Storyboard.TargetProperty="Stroke">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual" />
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="CheckStates">
          <VisualState x:Name="Unchecked" />
          <VisualState x:Name="Checked">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckedVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Indeterminate">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IndeterminateVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Focused">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Unfocused" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
      <Grid Grid.Column="0" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Top">
        <Border x:Name="BackgroundVisual" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" />
        <Border x:Name="MouseStatesVisual" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource CheckBoxBackground_MouseOver}" BorderBrush="{StaticResource CheckBoxBorder_MouseOver}" Visibility="Collapsed" />
        <Border x:Name="FocusStatesVisual" BorderThickness="1" BorderBrush="{StaticResource CheckBoxBorder_Focused}" Visibility="Collapsed" />
        <Border BorderThickness="{TemplateBinding BorderThickness}" FlowDirection="LeftToRight">
          <Grid x:Name="CheckMarks" Width="10" Height="10">
            <Path x:Name="CheckedVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L4,7 7.5,2" StrokeThickness="1.5" Stretch="None" />
            <Path x:Name="IndeterminateVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L8,5" StrokeThickness="2" Stretch="None" />
          </Grid>
        </Border>
      </Grid>
      <ContentPresenter x:Name="ContentVisual" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="CheckBoxStyle" TargetType="CheckBox">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="{StaticResource CheckBoxBorder}" />
    <Setter Property="Background" Value="{StaticResource CheckBoxBackground}" />
    <Setter Property="Foreground" Value="{StaticResource CheckBoxForeground}" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Top" />
    <Setter Property="Padding" Value="4 0 0 0" />
    <Setter Property="Template" Value="{StaticResource CheckBoxControlTemplate}" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  </Style>
  <Style TargetType="CheckBox" BasedOn="{StaticResource CheckBoxStyle}" />
  <!-- System.Windows.TextBox-->
  <Style x:Key="TextBoxStyle" TargetType="TextBox">
    <Setter Property="Background" Value="{StaticResource TextBoxBackground}" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="FontStyle" Value="Normal" />
    <Setter Property="FontWeight" Value="Normal" />
    <Setter Property="CaretBrush" Value="#FFDDDDDD" />
    <Setter Property="VerticalAlignment" Value="Center" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="2" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="TextBox">
          <Grid x:Name="RootElement">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="Opacity" To="0.3" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="ReadOnly">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Focused}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
              <Grid>
                <Border x:Name="ReadOnlyVisualElement" Background="{StaticResource TextBoxBackground_ReadOnly}" Opacity="0" />
                <ScrollViewer Padding="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_ContentHost" />
              </Grid>
            </Border>
            <Border x:Name="DisabledVisual" Visibility="Collapsed" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Disabled}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle}" />
  <!-- System.Windows.RadioButton-->
  <ControlTemplate x:Key="RadioButtonControlTemplate" TargetType="RadioButton">
    <Grid Background="Transparent">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="IndeterminateVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckedVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentVisual" />
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual" />
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Stroke">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateVisual" Storyboard.TargetProperty="Stroke">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual" />
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="CheckStates">
          <VisualState x:Name="Unchecked" />
          <VisualState x:Name="Checked">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckedVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Indeterminate">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IndeterminateVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Focused">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusStatesVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Unfocused" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
      <Grid Grid.Column="0" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Top">
        <Border x:Name="BackgroundVisual" CornerRadius="6" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" />
        <Border x:Name="MouseStatesVisual" CornerRadius="6" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource CheckBoxBackground_MouseOver}" BorderBrush="{StaticResource CheckBoxBorder_MouseOver}" Visibility="Collapsed" />
        <Border x:Name="FocusStatesVisual" CornerRadius="6" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource CheckBoxBorder_Focused}" Visibility="Collapsed" />
        <Border BorderThickness="{TemplateBinding BorderThickness}">
          <Grid x:Name="CheckMarks" Width="10" Height="10">
            <Path x:Name="CheckedVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L4,7 7.5,2" StrokeThickness="1.5" Stretch="None" />
            <Path x:Name="IndeterminateVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L8,5" StrokeThickness="2" Stretch="None" />
          </Grid>
        </Border>
      </Grid>
      <ContentPresenter x:Name="ContentVisual" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadioButtonStyle" TargetType="RadioButton">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="{StaticResource CheckBoxBorder}" />
    <Setter Property="Background" Value="{StaticResource CheckBoxBackground}" />
    <Setter Property="Foreground" Value="{StaticResource CheckBoxForeground}" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Top" />
    <Setter Property="Padding" Value="4 0 0 0" />
    <Setter Property="Template" Value="{StaticResource RadioButtonControlTemplate}" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  </Style>
  <Style TargetType="RadioButton" BasedOn="{StaticResource RadioButtonStyle}" />
  <!-- System.Windows.ListBox-->
  <!-- style for ListBox -->
  <Style x:Key="ListBoxStyle" TargetType="ListBox">
    <Setter Property="Padding" Value="1" />
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Top" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBox">
          <ScrollViewer x:Name="ScrollViewer" Margin="0" ScrollViewer.VerticalScrollBarVisibility="Auto" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ItemsPresenter />
          </ScrollViewer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}" />
  <!-- style for ListBoxItem -->
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="3" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Top" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverState" />
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="SelectedState" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected" />
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedState" />
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Active}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <!-- normal-->
            <Border CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}" Margin="1,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
            <!-- Mouseover -->
            <Border x:Name="MouseOverState" Opacity="0" Margin="1,0" CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}" Background="{StaticResource ControlSubItem_Background_MouseOver}" />
            <!-- Selected -->
            <Border x:Name="SelectedState" Opacity="0" Margin="1,0" CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}" Background="{StaticResource ControlSubItem_Background_Selected}" />
            <ContentControl x:Name="contentPresenter" Margin="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" ContentStringFormat="{TemplateBinding ContentStringFormat}" />
            <!-- Focus -->
            <Border x:Name="FocusVisual" Opacity="0" Margin="1,0" BorderThickness="1" CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}" />
  <!-- System.Windows.PasswordBox-->
  <Style x:Key="PasswordBoxStyle" TargetType="PasswordBox">
    <Setter Property="Background" Value="{StaticResource TextBoxBackground}" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="FontStyle" Value="Normal" />
    <Setter Property="FontWeight" Value="Normal" />
    <Setter Property="CaretBrush" Value="#FFDDDDDD" />
    <Setter Property="VerticalAlignment" Value="Center" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="2" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="PasswordBox">
          <Grid x:Name="RootElement">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Focused}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
              <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
            </Border>
            <Border x:Name="DisabledVisual" Visibility="Collapsed" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Disabled}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="PasswordBox" BasedOn="{StaticResource PasswordBoxStyle}" />
  <!-- System.Windows.RepeatButton-->
  <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="3" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusState" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" />
            <ContentControl x:Name="ContentElement" IsTabStop="False" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            <!-- Focus -->
            <Border BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Opacity="0" x:Name="FocusState" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="OpacityMask" Value="{StaticResource CoreButtonOuterBorder_Pressed}" />
  </Style>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}" />
  <!-- System.Windows.ToolTip-->
  <Style x:Key="ToolTipStyle" TargetType="ToolTip">
    <Setter Property="Padding" Value="5 0" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="{StaticResource ToolTip_OuterBorder}" />
    <Setter Property="Background" Value="{StaticResource ToolTip_Background}" />
    <Setter Property="Foreground" Value="{StaticResource ToolTip_Foreground}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ToolTip">
          <Grid>
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
              <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ToolTip_InnerBorder}">
                <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              </Border>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ToolTip" BasedOn="{StaticResource ToolTipStyle}" />
</ResourceDictionary>