<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.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFA9BFD6" />
    <GradientStop Color="#FFCDDAEA" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlBackground_Normal" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFDFEFF" Offset="0" />
    <GradientStop Color="#FFE6F0FA" Offset="0.5" />
    <GradientStop Color="#FFDCE6F4" Offset="0.5" />
    <GradientStop Color="#FFDDE9F7" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlForeground_Normal" Color="#FF1E395B" />
  <SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FFB8D6FB" />
  <LinearGradientBrush x:Key="ControlBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFBFCFD" Offset="0" />
    <GradientStop Color="#FFF6F8FB" Offset="0.5" />
    <GradientStop Color="#FFEDF2F9" Offset="0.5" />
    <GradientStop Color="#FFE5EBF4" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlInnerBorder_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="White" Offset="0" />
    <GradientStop Color="#FFFAFCFD" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_Pressed" Color="#FFC0CBD9" />
  <LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFC0CBD9" Offset="0" />
    <GradientStop Color="#FFE6EAEE" Offset="0.5" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFC0CBD9" Offset="0" />
    <GradientStop Color="#FFE6EAEE" Offset="0.5" />
  </LinearGradientBrush>
  <CornerRadius x:Key="ControlOuterBorder_CornerRadius">2</CornerRadius>
  <CornerRadius x:Key="ControlInnerBorder_CornerRadius">1</CornerRadius>
  <LinearGradientBrush x:Key="ControlInnerBorder_Normal" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFAFCFD" Offset="0" />
    <GradientStop Color="#FFE4EFFB" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FFD9D9D9" />
  <SolidColorBrush x:Key="ControlBackground_Disabled" Color="#FFF8F8F8" />
  <LinearGradientBrush x:Key="ControlInnerBorder_Disabled" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFAFAFB" Offset="0" />
    <GradientStop Color="#FFF0F0F0" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF6CAFFF" />
  <SolidColorBrush x:Key="ControlBackground_Focused" Color="Transparent" />
  <SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="Transparent" />
  <SolidColorBrush x:Key="CoreButtonOuterBorder_Pressed" Color="#FFC0CBD9" />
  <LinearGradientBrush x:Key="ControlShapeGradientFill" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF1E395B" />
    <GradientStop Color="#FF8CA0B9" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_Over" Color="#FF91C3FF" />
  <LinearGradientBrush x:Key="ControlActiveElementBorder_Horizontal_Over" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="White" Offset="0" />
    <GradientStop Color="#FFFAFCFD" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlActiveElementBackground_Horizontal_Over" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FFFBFCFD" Offset="0" />
    <GradientStop Color="#FFE5EBF4" Offset="1" />
    <GradientStop Color="#FFF6F8FB" Offset="0.5" />
    <GradientStop Color="#FFEDF2F9" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder" Color="#FFA0AFC3" />
  <LinearGradientBrush x:Key="ControlActiveElementBorder_Horizontal_Pressed" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FFC0CBD9" Offset="0" />
    <GradientStop Color="#4CC0CBD9" Offset="0.5" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlActiveElementBackground_Horizontal_Pressed" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FFC0CBD9" Offset="0" />
    <GradientStop Color="#4CC0CBD9" Offset="0.5" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlShapeGradientFill_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF1E395B" />
    <GradientStop Color="#FF4D6A90" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlShapeFill_Disabled" Color="#FFA7A7A7" />
  <LinearGradientBrush x:Key="ControlActiveElementBorder_Horizontal" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FFFAFCFD" Offset="0" />
    <GradientStop Color="#FFE4EFFB" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlActiveElementBackground_Horizontal" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FFFDFEFF" Offset="0" />
    <GradientStop Color="#FFDDE9F7" Offset="1" />
    <GradientStop Color="#FFE6F0FA" Offset="0.5" />
    <GradientStop Color="#FFDCE6F4" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlShapeFill" Color="#FF1E395B" />
  <LinearGradientBrush x:Key="ControlActiveElementBorder" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFAFCFD" Offset="0" />
    <GradientStop Color="#FFE4EFFB" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlActiveElementBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFDFEFF" Offset="0" />
    <GradientStop Color="#FFDDE9F7" Offset="1" />
    <GradientStop Color="#FFE6F0FA" Offset="0.5" />
    <GradientStop Color="#FFDCE6F4" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ScrollBarBackground" Color="#FFF6F9FE" />
  <SolidColorBrush x:Key="ControlForeground" Color="#FF1E395B" />
  <LinearGradientBrush x:Key="ControlInnerBackground_Over" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFBFCFD" />
    <GradientStop Color="#FFC6DFFF" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlActiveElementBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFC0CBD9" Offset="0" />
    <GradientStop Color="#4CC0CBD9" Offset="0.5" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlInnerBackground_Disabled" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFF8F8F8" Offset="1" />
    <GradientStop Color="#FFE5E5E5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlBackground" Color="#FFFCFCFC" />
  <LinearGradientBrush x:Key="ControlInnerBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFBFCFD" Offset="1" />
    <GradientStop Color="#FFC7D5EA" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="TextBoxBackground_ReadOnly" Color="#5EC9C9C9" />
  <SolidColorBrush x:Key="ControlOuterBorder_Highlighted" Color="#FFB8D6FB" />
  <LinearGradientBrush x:Key="ControlBackground_Highlighted" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFAFBFD" Offset="0.004" />
    <GradientStop Color="#FFEBF3FD" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlInnerBorder_Highlighted" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFCFDFE" />
    <GradientStop Color="#FFF2F7FE" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlSubItem_OuterBorder_Selected" Color="#FF7DA2CE" />
  <LinearGradientBrush x:Key="ControlSubItem_Background_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFDCEBFC" />
    <GradientStop Color="#FFC1DBFC" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlSubItem_InnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFEBF4FD" />
    <GradientStop Color="#FFDBEAFD" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ToolTip_OuterBorder" Color="#FFA0AFC3" />
  <LinearGradientBrush x:Key="ToolTip_Background" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFDFEFF" Offset="0" />
    <GradientStop Color="#FFDDE9F7" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ToolTip_Foreground" Color="#FF1E395B" />
  <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 Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity">
                      <DiscreteDoubleKeyFrame KeyTime="00:00:00.050" Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="1" />
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                      <LinearDoubleKeyFrame KeyTime="00:00:00.150" Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                      <LinearDoubleKeyFrame KeyTime="00:00:00.115" Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
              <Border x:Name="InnerBorder" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Normal}" />
            </Border>
            <Border x:Name="DisabledVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Disabled}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
              <Border Background="{StaticResource ControlBackground_Disabled}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Disabled}" />
            </Border>
            <ContentPresenter x:Name="Content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
            <!-- Focus -->
            <Border x:Name="CommonStatesWrapper">
              <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Background="{StaticResource ControlBackground_Focused}">
                <Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}" />
              </Border>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="OpacityMask" Value="{StaticResource CoreButtonOuterBorder_Pressed}" />
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}" />
  <!-- System.Windows.ScrollViewer-->
  <Style x:Key="VerticalRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="Foreground" Value="{StaticResource ControlShapeGradientFill}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlShapeGradientFill_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlShapeFill_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="1" Background="Transparent" BorderBrush="Transparent" CornerRadius="2">
              <Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="1" CornerRadius="1" />
            </Border>
            <ContentControl IsTabStop="{TemplateBinding IsTabStop}" HorizontalAlignment="Center" x:Name="ContentPresenter" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HorizontalRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="Foreground" Value="{StaticResource ControlShapeGradientFill}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlShapeGradientFill_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlShapeFill_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="1" Background="Transparent" BorderBrush="Transparent" CornerRadius="2">
              <Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="1" CornerRadius="1" />
            </Border>
            <ContentControl IsTabStop="{TemplateBinding IsTabStop}" HorizontalAlignment="Center" x:Name="ContentPresenter" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="VerticalScrollBarThumbStyle" TargetType="{x:Type Thumb}" BasedOn="{x:Null}">
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Grid x:Name="ThumbVisual">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="1" Background="Transparent" BorderBrush="{StaticResource ControlOuterBorder}" CornerRadius="2">
              <Border x:Name="InnerBorder" BorderBrush="{StaticResource ControlActiveElementBorder_Horizontal}" BorderThickness="1" CornerRadius="1" Background="{StaticResource ControlActiveElementBackground_Horizontal}" />
            </Border>
            <StackPanel HorizontalAlignment="Center" Width="7" VerticalAlignment="Center">
              <Border x:Name="Line1" Background="{StaticResource ControlShapeFill}" Height="1" />
              <Border x:Name="Line2" Background="{StaticResource ControlShapeFill}" Height="1" Margin="0,1,0,0" />
              <Border x:Name="Line3" Background="{StaticResource ControlShapeFill}" Height="1" Margin="0,1,0,0" />
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="HorizontalScrollBarThumbStyle" TargetType="{x:Type Thumb}" BasedOn="{x:Null}">
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Grid x:Name="ThumbVisual">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Visibility" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBorder_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Horizontal_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="1" Background="Transparent" BorderBrush="{StaticResource ControlOuterBorder}" CornerRadius="2">
              <Border x:Name="InnerBorder" BorderBrush="{StaticResource ControlActiveElementBorder}" BorderThickness="1" CornerRadius="1" Background="{StaticResource ControlActiveElementBackground}" />
            </Border>
            <StackPanel HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Orientation="Horizontal">
              <Border x:Name="Line1" Background="{StaticResource ControlShapeFill}" Width="1" />
              <Border x:Name="Line2" Background="{StaticResource ControlShapeFill}" Width="1" Margin="1,0,0,0" />
              <Border x:Name="Line3" Background="{StaticResource ControlShapeFill}" Width="1" Margin="1,0,0,0" />
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScrollViewerRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ButtonBase}">
          <Border x:Name="ContentContainer" SnapsToDevicePixels="true" Background="Transparent">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ScrollBarStyle" TargetType="{x:Type ScrollBar}">
    <Setter Property="MinWidth" Value="16" />
    <Setter Property="MinHeight" Value="16" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollBar}">
          <Border x:Name="border" Background="{StaticResource ScrollBarBackground}">
            <Grid x:Name="GridRoot" Height="Auto">
              <Grid.RowDefinitions>
                <RowDefinition Height="17" />
                <RowDefinition x:Name="rowDefinition" Height="1*" />
                <RowDefinition Height="17" />
              </Grid.RowDefinitions>
              <RepeatButton x:Name="DecreaseRepeat" Style="{StaticResource VerticalRepeatButtonStyle}" IsTabStop="False" Interval="50" Command="ScrollBar.LineUpCommand">
                <Grid>
                  <Path x:Name="DecreaseArrow" Data="M 0 4 L 8 4 L 4 0 Z" Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}" />
                </Grid>
              </RepeatButton>
              <Track Grid.Row="1" x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="true">
                <Track.Thumb>
                  <Thumb x:Name="thumb" Style="{StaticResource VerticalScrollBarThumbStyle}" />
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                  <RepeatButton x:Name="PageUp" Style="{StaticResource ScrollViewerRepeatButtonStyle}" Command="ScrollBar.PageDownCommand" IsTabStop="False" />
                </Track.IncreaseRepeatButton>
                <Track.DecreaseRepeatButton>
                  <RepeatButton x:Name="PageDown" Style="{StaticResource ScrollViewerRepeatButtonStyle}" Command="ScrollBar.PageUpCommand" IsTabStop="False" />
                </Track.DecreaseRepeatButton>
              </Track>
              <RepeatButton Grid.Row="2" x:Name="IncreaseRepeat" Style="{StaticResource VerticalRepeatButtonStyle}" Command="ScrollBar.LineDownCommand" IsTabStop="False">
                <Grid>
                  <Path x:Name="IncreaseArrow" Data="M 0 0 L 4 4 L 8 0 Z" Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}" />
                </Grid>
              </RepeatButton>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <!--HORIZONTAL-->
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type ScrollBar}">
              <Border x:Name="border" Background="{StaticResource ScrollBarBackground}">
                <Grid x:Name="GridRoot" Height="Auto">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="17" />
                    <ColumnDefinition x:Name="columnDefinition" Width="1*" />
                    <ColumnDefinition Width="17" />
                  </Grid.ColumnDefinitions>
                  <RepeatButton x:Name="DecreaseRepeat" Style="{StaticResource HorizontalRepeatButtonStyle}" IsTabStop="False" Interval="50" Command="ScrollBar.LineLeftCommand">
                    <Grid>
                      <Path x:Name="DecreaseArrow" Data="M 0 4 L 8 4 L 4 0 Z" Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}" RenderTransformOrigin=".5,.5">
                        <Path.RenderTransform>
                          <RotateTransform Angle="-90" />
                        </Path.RenderTransform>
                      </Path>
                    </Grid>
                  </RepeatButton>
                  <Track Grid.Column="1" x:Name="PART_Track" Orientation="Horizontal" IsDirectionReversed="False">
                    <Track.Thumb>
                      <Thumb x:Name="thumb" Style="{StaticResource HorizontalScrollBarThumbStyle}" />
                    </Track.Thumb>
                    <Track.IncreaseRepeatButton>
                      <RepeatButton x:Name="PageUp" Style="{StaticResource ScrollViewerRepeatButtonStyle}" Command="ScrollBar.PageRightCommand" IsTabStop="False" />
                    </Track.IncreaseRepeatButton>
                    <Track.DecreaseRepeatButton>
                      <RepeatButton x:Name="PageDown" Style="{StaticResource ScrollViewerRepeatButtonStyle}" Command="ScrollBar.PageLeftCommand" IsTabStop="False" />
                    </Track.DecreaseRepeatButton>
                  </Track>
                  <RepeatButton Grid.Column="2" x:Name="IncreaseRepeat" Style="{StaticResource HorizontalRepeatButtonStyle}" Command="ScrollBar.LineRightCommand" IsTabStop="False">
                    <Grid>
                      <Path x:Name="IncreaseArrow" Data="M 0 0 L 4 4 L 8 0 Z" Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}" RenderTransformOrigin=".5,.5">
                        <Path.RenderTransform>
                          <RotateTransform Angle="-90" />
                        </Path.RenderTransform>
                      </Path>
                    </Grid>
                  </RepeatButton>
                </Grid>
              </Border>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Trigger>
    </Style.Triggers>
  </Style>
  <ControlTemplate x:Key="ScrollViewerTemplate" TargetType="ScrollViewer">
    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
      <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <ScrollContentPresenter Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" />
        <Border Grid.Column="1" Grid.Row="1" Background="{StaticResource ScrollBarBackground}" />
        <ScrollBar IsTabStop="False" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" MinWidth="16" x:Name="PART_VerticalScrollBar" Orientation="Vertical" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" />
        <ScrollBar IsTabStop="False" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" MinHeight="16" x:Name="PART_HorizontalScrollBar" Orientation="Horizontal" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" />
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="ScrollViewerStyle" TargetType="ScrollViewer">
    <Setter Property="Template" Value="{StaticResource ScrollViewerTemplate}" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style BasedOn="{StaticResource ScrollBarStyle}" TargetType="ScrollBar" />
  <Style BasedOn="{StaticResource ScrollViewerStyle}" TargetType="ScrollViewer" />
  <!-- System.Windows.CheckBox-->
  <!--  style for CheckBox -->
  <Style x:Key="CheckBoxStyle" TargetType="CheckBox">
    <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="CheckBox">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="16" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <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_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBackground_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlShapeFill_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlShapeFill_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation BeginTime="0:0:0" To="1" Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Opacity" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
                <VisualState x:Name="Indeterminate">
                  <Storyboard>
                    <DoubleAnimation BeginTime="0:0:0" To="1" Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="Opacity" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
              <Border x:Name="OuterBorder" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="1" Width="14" Height="14" VerticalAlignment="Center" Background="{StaticResource ControlBackground}">
                <Border x:Name="InnerBorder" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="1" Margin="1" Background="{StaticResource ControlInnerBackground}" />
              </Border>
              <Path x:Name="CheckIcon" FlowDirection="LeftToRight" Stretch="Fill" Width="8" Height="8" Stroke="{StaticResource ControlShapeFill}" VerticalAlignment="Center" Data="M32.192282,77.371554 L34.688632,80.304322 38.863374,72.720928" StrokeThickness="2" Opacity="0" />
              <Path x:Name="IndeterminateIcon" FlowDirection="LeftToRight" Stretch="Fill" Width="8" Height="2" Stroke="{StaticResource ControlShapeFill}" StrokeThickness="2" VerticalAlignment="Center" Data="M14.708333,144.5 L20.667,144.5" Opacity="0" />
            </Grid>
            <ContentPresenter Grid.Column="1" x:Name="contentPresenter" Content="{TemplateBinding Content}" RecognizesAccessKey="True" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style BasedOn="{StaticResource CheckBoxStyle}" TargetType="CheckBox" />
  <!-- System.Windows.TextBox-->
  <Style x:Key="TextBoxStyle" TargetType="TextBox">
    <Setter Property="Background" Value="{StaticResource PickerBackground_Normal}" />
    <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="VerticalAlignment" Value="Center" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="Padding" Value="3 2" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <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-->
  <!--  style for CheckBox -->
  <Style x:Key="RadioButtonStyle" TargetType="RadioButton">
    <Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
    <Setter Property="Padding" Value="4,0,0,0" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RadioButton">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="16" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <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_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBackground_Over}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlActiveElementBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlShapeFill_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation BeginTime="0:0:0" To="1" Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Opacity" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
                <VisualState x:Name="Indeterminate">
                  <Storyboard>
                    <DoubleAnimation BeginTime="0:0:0" To="1" Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="Opacity" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
              <Border x:Name="OuterBorder" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="1" Width="14" Height="14" CornerRadius="7" VerticalAlignment="Center" Background="{StaticResource ControlBackground}">
                <Border x:Name="InnerBorder" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="1" Margin="1" CornerRadius="6" Background="{StaticResource ControlInnerBackground}" />
              </Border>
              <Ellipse x:Name="CheckIcon" Width="6" Height="6" VerticalAlignment="Center" StrokeThickness="1" HorizontalAlignment="Center" Fill="{StaticResource ControlShapeGradientFill}" Opacity="0" Stroke="{StaticResource ControlOuterBorder}" />
            </Grid>
            <ContentPresenter Grid.Column="1" x:Name="contentPresenter" Content="{TemplateBinding Content}" RecognizesAccessKey="True" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style BasedOn="{StaticResource RadioButtonStyle}" TargetType="RadioButton" />
  <!-- System.Windows.ListBox-->
  <!-- style for ListBoxItem -->
  <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
    <Setter Property="Padding" Value="3" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Top" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="1" />
    <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" Storyboard.TargetName="MouseOverState" Storyboard.TargetProperty="Opacity" To="1" />
                  </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" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected" />
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="SelectedState" Storyboard.TargetProperty="Opacity" To="1" />
                  </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 ControlOuterBorder_CornerRadius}" Margin="1,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
            <!-- Mouseover -->
            <Border x:Name="MouseOverState" Opacity="0" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Margin="1,0" BorderBrush="{StaticResource ControlOuterBorder_Highlighted}" BorderThickness="{TemplateBinding BorderThickness}">
              <Border Background="{StaticResource ControlBackground_Highlighted}" BorderBrush="{StaticResource ControlInnerBorder_Highlighted}" BorderThickness="1" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" />
            </Border>
            <!-- Selected -->
            <Border x:Name="SelectedState" Opacity="0" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Margin="1,0" BorderBrush="{StaticResource ControlSubItem_OuterBorder_Selected}" BorderThickness="{TemplateBinding BorderThickness}">
              <Border Background="{StaticResource ControlSubItem_Background_Selected}" BorderBrush="{StaticResource ControlSubItem_InnerBorder_Selected}" BorderThickness="1" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" />
            </Border>
            <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            <!-- Focus -->
            <Border x:Name="FocusVisual" Opacity="0" Margin="1,0" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}" />
  <!-- 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="1" />
    <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemStyle}" />
    <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" 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}" />
  <!-- System.Windows.PasswordBox-->
  <Style x:Key="PasswordBoxStyle" TargetType="PasswordBox">
    <Setter Property="Background" Value="{StaticResource PickerBackground_Normal}" />
    <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="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>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity">
                      <DiscreteDoubleKeyFrame KeyTime="00:00:00.050" Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="1" />
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                      <LinearDoubleKeyFrame KeyTime="00:00:00.150" Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                      <LinearDoubleKeyFrame KeyTime="00:00:00.115" Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
              <Border x:Name="InnerBorder" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Normal}" />
            </Border>
            <Border x:Name="DisabledVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Disabled}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
              <Border Background="{StaticResource ControlBackground_Disabled}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Disabled}" />
            </Border>
            <ContentPresenter x:Name="Content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
            <!-- Focus -->
            <Border x:Name="CommonStatesWrapper">
              <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Background="{StaticResource ControlBackground_Focused}">
                <Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}" />
              </Border>
            </Border>
          </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>