<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:calculator="clr-namespace:Telerik.Windows.Controls.Calculator;assembly=Telerik.Windows.Controls.Input" xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" xmlns:calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input" xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls" xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls" xmlns:telerikMaskedTextBox="clr-namespace:Telerik.Windows.Controls.MaskedTextBox;assembly=Telerik.Windows.Controls.Input" xmlns:telerikMaskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input" xmlns:telerikRating="clr-namespace:Telerik.Windows.Controls.Rating;assembly=Telerik.Windows.Controls.Input" xmlns:colorPickerConverters="clr-namespace:Telerik.Windows.Controls.ColorEditor.Converters;assembly=Telerik.Windows.Controls.Input" xmlns:colorPicker="clr-namespace:Telerik.Windows.Controls.ColorEditor;assembly=Telerik.Windows.Controls.Input" xmlns:maskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input" xmlns:effects="clr-namespace:Telerik.Windows.Controls.ColorEditor.Effects;assembly=Telerik.Windows.Controls.Input" xmlns:colorMode="clr-namespace:Telerik.Windows.Controls.ColorEditor.Mode;assembly=Telerik.Windows.Controls.Input" xmlns:colorEditorHelpers="clr-namespace:Telerik.Windows.Controls.ColorEditor.Helpers;assembly=Telerik.Windows.Controls.Input" xmlns:pad="clr-namespace:Telerik.Windows.Controls.ColorEditor.Pad;assembly=Telerik.Windows.Controls.Input">
  <!-- Brushes and Resources-->
  <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" />
  <CornerRadius x:Key="ControlOuterBorder_CornerRadius">3</CornerRadius>
  <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" />
  <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF789FC3" />
  <LinearGradientBrush x:Key="ControlOuterBorder_MouseOverChecked" EndPoint="0.971000015735626,0.5" StartPoint="0.0399999991059303,0.5">
    <GradientStop Color="#FF767679" Offset="0" />
    <GradientStop Color="#FF767679" Offset="1" />
    <GradientStop Color="#FFB2B3B4" Offset="0.5" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlBackground_MouseOverChecked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF616060" Offset="0" />
    <GradientStop Color="#FFAAAAAA" Offset="1" />
    <GradientStop Color="#FFAAAAAA" Offset="0.14" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlForeground_Active" Color="#FF262626" />
  <LinearGradientBrush x:Key="ControlOuterBorder_Checked" EndPoint="0.971000015735626,0.5" StartPoint="0.0399999991059303,0.5">
    <GradientStop Color="#FF595959" Offset="0" />
    <GradientStop Color="#FF595959" Offset="1" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlBackground_Checked" 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="ControlElement_MouseOver" Color="#FF262626" />
  <SolidColorBrush x:Key="ControlElement_Active" Color="#FF262626" />
  <SolidColorBrush x:Key="ControlElement_Disabled" Color="#FF868686" />
  <SolidColorBrush x:Key="ControlElement_Normal" Color="#FFC5C2C2" />
  <SolidColorBrush x:Key="ControlOuterBorder" Color="#FF595959" />
  <SolidColorBrush x:Key="ControlBackground" Color="#FF3D3D3D" />
  <LinearGradientBrush x:Key="ControlOuterBorder_DisabledChecked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF282828" />
    <GradientStop Color="#FF5F5F5F" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlBackground_DisabledChecked" Color="#FFE0E0E0" />
  <LinearGradientBrush x:Key="ControlOuterBorder_Highlighted" EndPoint="0.971000015735626,0.5" StartPoint="0.0399999991059303,0.5">
    <GradientStop Color="#FF767679" Offset="0" />
    <GradientStop Color="#FF767679" Offset="1" />
    <GradientStop Color="#FFB2B3B4" Offset="0.5" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlBackground_Highlighted" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF616060" Offset="0" />
    <GradientStop Color="#FFAAAAAA" Offset="1" />
    <GradientStop Color="#FFAAAAAA" Offset="0.14" />
  </LinearGradientBrush>
  <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  <SolidColorBrush x:Key="ControlBackground_Focused" Color="Transparent" />
  <SolidColorBrush x:Key="ButtonBackground_MouseOver" Color="#FF878787" />
  <LinearGradientBrush x:Key="ButtonBorder_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="Icon_MouseOver" Color="#FF262626" />
  <LinearGradientBrush x:Key="ButtonBackground_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="ButtonBorder_Pressed" Color="#FF1A1A1A" />
  <SolidColorBrush x:Key="Icon_Pressed" Color="#FFC5C2C2" />
  <SolidColorBrush x:Key="ButtonBackground_Disabled" Color="#FF666666" />
  <SolidColorBrush x:Key="ButtonBorder_Disabled" Color="#FF5D5C5C" />
  <SolidColorBrush x:Key="Icon_Disabled" Color="#FF868686" />
  <SolidColorBrush x:Key="Icon_Normal" Color="#FFC5C2C2" />
  <SolidColorBrush x:Key="ButtonForeground_MouseOver" Color="#FF262626" />
  <SolidColorBrush x:Key="ButtonForeground_Pressed" Color="#FFDDDDDD" />
  <SolidColorBrush x:Key="ButtonBackground_Normal" Color="#FF575859" />
  <LinearGradientBrush x:Key="ButtonBorder_Normal" 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="TextBoxBorder_Disabled" Color="#FF5D5C5C" />
  <SolidColorBrush x:Key="PickerBackground" Color="#FF333333" />
  <SolidColorBrush x:Key="ButtonBorder_Focus" Color="#FF789FC3" />
  <SolidColorBrush x:Key="PopupBorder" Color="#FF595959" />
  <SolidColorBrush x:Key="PopupBackground" Color="#FF3D3D3D" />
  <SolidColorBrush x:Key="ItemForeground_Selected" Color="#FF262626" />
  <SolidColorBrush x:Key="ComboBox_ItemBackground_Selected" Color="#FF878787" />
  <SolidColorBrush x:Key="PickerForeground" Color="#FFDDDDDD" />
  <LinearGradientBrush x:Key="PickerBorder_Normal" 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="PickerForeground_Disabled" Color="#FF666666" />
  <SolidColorBrush x:Key="ControlHeader_Foreground" Color="#FFDDDDDD" />
  <SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterColorStroke" Color="#FF000000" />
  <SolidColorBrush x:Key="ColorPicker_TitleBackground" Color="#FF494A4D" />
  <LinearGradientBrush x:Key="ColorPicker_TitleBorder" EndPoint="0.997,-6.125" StartPoint="0.026,-6.125">
    <GradientStop Color="#FF707070" Offset="0" />
    <GradientStop Color="#FF707070" Offset="1" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
  </LinearGradientBrush>
  <CornerRadius x:Key="ColorPicker_HeaderButtonOuterBorder_CornerRadius">1</CornerRadius>
  <LinearGradientBrush x:Key="ColorPicker_HeaderButtonOuterBorder_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="ColorPicker_HeaderButtonInnerBackground_MouseOver" Color="#FF878787" />
  <SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerColorStroke" Color="#FFBFBFBF" />
  <CornerRadius x:Key="ColorPicker_ButtonOuterBorder_LeftCornerRadius">3,0,0,3</CornerRadius>
  <SolidColorBrush x:Key="ControlElement_Pressed" Color="#FFC5C2C2" />
  <CornerRadius x:Key="ColorPicker_ButtonOuterBorder_RightCornerRadius">0,3,3,0</CornerRadius>
  <SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_Selected" Color="#FF5D5D5D" />
  <SolidColorBrush x:Key="ColorPaletteViewItem_Border" Color="#00000000" />
  <LinearGradientBrush x:Key="ColorPaletteViewItem_OuterBorder_MouseOver" EndPoint="0.997,-6.125" StartPoint="0.026,-6.125">
    <GradientStop Color="#FF707070" Offset="0" />
    <GradientStop Color="#FF707070" Offset="1" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ColorPicker_Foreground" Color="#FFDDDDDD" />
  <telerik:ColorToBrushConverter x:Key="converter" />
  <SolidColorBrush x:Key="ColorPicker_ButtonBackground_MouseOver" Color="#FF878787" />
  <LinearGradientBrush x:Key="ColorPicker_ButtonBorder_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="SliderThumb_OuterBorder_Normal" Color="#FF848484" />
  <SolidColorBrush x:Key="TextBoxBackground" Color="#FF333333" />
  <SolidColorBrush x:Key="MaskedTextBoxBackground_ReadOnly" Color="#6a6a6a" />
  <SolidColorBrush x:Key="ControlForeground_Disabled" Color="#FF868686" />
  <LinearGradientBrush x:Key="HeaderBorder" StartPoint="0,0.5" EndPoint="1,0.5">
    <GradientStop Color="#FF707070" Offset="0" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
    <GradientStop Color="#FF707070" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF5B5B5B" Offset="1" />
    <GradientStop Color="#FF868686" />
    <GradientStop Color="#FF4F4F4F" Offset="0.42" />
    <GradientStop Color="#FF0E0E0E" Offset="0.43" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlBorder" Color="#FF595959" />
  <SolidColorBrush x:Key="DateTimePicker_ItemBackground_MouseOver" Color="#FF878787" />
  <LinearGradientBrush x:Key="DateTimePicker_ItemBorder_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>
  <LinearGradientBrush x:Key="DateTimePicker_ItemBorder_Selected" EndPoint="0.971000015735626,0.5" StartPoint="0.0399999991059303,0.5">
    <GradientStop Color="#FF595959" Offset="0" />
    <GradientStop Color="#FF595959" Offset="1" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="DateTimePicker_ItemBackground_Selected" Color="#FFCDCDCD" />
  <SolidColorBrush x:Key="ButtonForeground_Normal" Color="#FFDDDDDD" />
  <SolidColorBrush x:Key="CalendarButtonAnotherViewForeground" Color="#FF797878" />
  <SolidColorBrush x:Key="WeekNumbersForeground" Color="#FF333333" />
  <SolidColorBrush x:Key="CalendarButtonBorder_Today" Color="#FF789FC3" />
  <SolidColorBrush x:Key="CalendarView_SubHeaderBackground" Color="#FF575859" />
  <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter" />
  <SolidColorBrush x:Key="WeekNumbersBackground" Color="#FF8A8989" />
  <SolidColorBrush x:Key="Rating_Background" Color="Transparent" />
  <SolidColorBrush x:Key="Rating_BorderBrush" Color="Transparent" />
  <SolidColorBrush x:Key="Rating_ReadOnlyBackground" Color="#83FFFFFF" />
  <SolidColorBrush x:Key="Rating_ReadOnlyBorderBrush" Color="#A5F7F7F7" />
  <SolidColorBrush x:Key="FocusBrushBlack" Color="#FF000000" />
  <SolidColorBrush x:Key="RatingItem_Background" Color="#FF575859" />
  <LinearGradientBrush x:Key="RatingItem_BorderBrush" 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>
  <LinearGradientBrush x:Key="RatingItem_SelectedBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF2E2D2D" Offset="0" />
    <GradientStop Color="#FF424242" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="RatingItem_SelectedBorder" Color="#FF1A1A1A" />
  <SolidColorBrush x:Key="RatingItem_MouseOverBackground" Color="#FF878787" />
  <LinearGradientBrush x:Key="RatingItem_MouseOverBorder" 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="RatingItem_SelectedDisabledBackground" Color="#FFacabab" />
  <LinearGradientBrush x:Key="RatingItem_SelectedUnHoveredBorder" 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>
  <LinearGradientBrush x:Key="RatingItem_SelectedUnHoveredBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF616060" Offset="0" />
    <GradientStop Color="#FFCDCDCD" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="CalculatorResults_OuterBorder" EndPoint="0.922999978065491,0.5" StartPoint="0.0860000029206276,0.5">
    <GradientStop Color="#FF707070" Offset="0" />
    <GradientStop Color="#FF707070" Offset="1" />
    <GradientStop Color="#FFA3A3A3" Offset="0.5" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="CalculatorResults_Background" Color="Black" />
  <SolidColorBrush x:Key="CalculatorResults_InnerBorder" Color="Transparent" />
  <SolidColorBrush x:Key="CalculatorResults_InnerBackground" Color="#FF2D2E32" />
  <SolidColorBrush x:Key="CalculatorResults_TransparentBackground" Color="Transparent" />
  <SolidColorBrush x:Key="MemoryButton_Background" Color="#FF494A4D" />
  <SolidColorBrush x:Key="OperatorsButton_Background" Color="#FF494A4D" />
  <SolidColorBrush x:Key="Calculator_Background" Color="#FF494A4D" />
  <LinearGradientBrush x:Key="Calculator_BorderBrush" 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="Calculator_Foreground" Color="#FFD6D4D4" />
  <SolidColorBrush x:Key="CalculatorPicker_Background" Color="#FF494A4D" />
  <LinearGradientBrush x:Key="CalculatorPicker_BorderBrush" 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="CalculatorPicker_Foreground" Color="#FFD6D4D4" />
  <SolidColorBrush x:Key="TextBoxBackground_ReadOnly" Color="#5EC9C9C9" />
  <!--RadButton-->
  <Style x:Key="RadButtonStyle" TargetType="telerik:RadButton">
    <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="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadButton">
          <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 Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(TextBlock.Foreground)">
                      <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="Content" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="BackgroundVisibility">
                <VisualState x:Name="BackgroundHidden">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="BackgroundVisible" />
              </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="{TemplateBinding CornerRadius}" />
            <ContentPresenter x:Name="Content" TextBlock.Foreground="{TemplateBinding Foreground}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" RecognizesAccessKey="True" />
            <!-- Focus -->
            <Border BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0" x:Name="FocusState" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}" />
  <Style x:Key="RadToggleButtonStyle" TargetType="telerik:RadToggleButton">
    <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="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <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>
                  </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="Content" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DisabledChecked">
                  <Storyboard>
                    <!--<DoubleAnimation Duration="0"
												Storyboard.TargetName="CheckedVisual"
												Storyboard.TargetProperty="Opacity" To="0.5" />-->
                    <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="Content" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOverChecked">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Active}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="BackgroundVisibility">
                <VisualState x:Name="BackgroundHidden">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="BackgroundVisible" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="FocusState" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" />
            <!-- checked -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Checked}" Background="{StaticResource ControlBackground_Checked}" CornerRadius="{TemplateBinding CornerRadius}" />
            <ContentControl x:Name="Content" IsTabStop="False" Margin="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
            <!-- Focus -->
            <Border BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0" x:Name="FocusState" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik:RadToggleButton" BasedOn="{StaticResource RadToggleButtonStyle}" />
  <Style x:Key="RadRadioButtonStyle" TargetType="telerik:RadRadioButton">
    <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="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadRadioButton">
          <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>
                  </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="Content" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOverChecked">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Unchecked" />
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Active}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="BackgroundVisibility">
                <VisualState x:Name="BackgroundHidden">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="BackgroundVisible" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="FocusState" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" />
            <!-- checked -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Checked}" Background="{StaticResource ControlBackground_Checked}" CornerRadius="{TemplateBinding CornerRadius}" />
            <ContentControl x:Name="Content" IsTabStop="False" Margin="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
            <!-- Focus -->
            <Border BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0" x:Name="FocusState" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik:RadRadioButton" BasedOn="{StaticResource RadRadioButtonStyle}" />
  <Style x:Key="RadDropDownButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="IsOpen" Value="false" />
    <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="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadDropDownButton">
          <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>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_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="DropDownIndicator" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Active}" />
                    </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="Content" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed" />
                <VisualState x:Name="Opened">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Active}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Active}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtLeft">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>0</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DropDownButtonAtTop">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>0</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DropDownButtonAtBottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PopupPlacementState">
                <VisualState x:Name="PlacementBottom" />
                <VisualState x:Name="PlacementTop">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="RenderTransform">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <TransformGroup>
                            <RotateTransform Angle="180" />
                          </TransformGroup>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="PlacementLeft">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="RenderTransform">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <TransformGroup>
                            <RotateTransform Angle="90" />
                          </TransformGroup>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="PlacementRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="RenderTransform">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <TransformGroup>
                            <RotateTransform Angle="-90" />
                          </TransformGroup>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="BackgroundVisibility">
                <VisualState x:Name="BackgroundHidden">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="BackgroundVisible" />
              </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="{TemplateBinding CornerRadius}" />
            <!-- checked -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Checked}" Background="{StaticResource ControlBackground_Checked}" CornerRadius="{TemplateBinding CornerRadius}" />
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              <ContentControl x:Name="Content" IsTabStop="False" Foreground="{TemplateBinding Foreground}" Grid.Row="1" Grid.Column="1" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
              <Path x:Name="DropDownIndicator" Grid.Row="2" Grid.Column="1" IsHitTestVisible="False" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Fill="{StaticResource ControlElement_Normal}" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Margin="5,3,5,3" Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z" SnapsToDevicePixels="True" />
            </Grid>
            <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="false" Placement="Bottom">
              <Grid>
                <Border x:Name="DropDownPopupBorder" BorderBrush="{StaticResource ControlOuterBorder}" Background="{StaticResource ControlBackground}" BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" Margin="0,1,4,4" MinWidth="3" MinHeight="3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}" MaxWidth="{TemplateBinding DropDownMaxWidth}" MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentPresenter x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" ContentTemplate="{TemplateBinding DropDownContentTemplate}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}" />
                </Border>
              </Grid>
            </Popup>
            <!-- Focus -->
            <Border BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0" x:Name="FocusState" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}" />
  <!-- SplitButton -->
  <Style x:Key="toggleStyle" TargetType="telerik:RadToggleButton">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="3" />
    <Setter Property="CornerRadius" Value="0 3 3 0" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <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="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <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="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DisabledChecked">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                    <DoubleAnimation Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_DisabledChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_DisabledChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOverChecked">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Active}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused" />
                <VisualState x:Name="Focused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{TemplateBinding CornerRadius}" Background="{TemplateBinding Background}" />
            <!-- checked -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Checked}" CornerRadius="{TemplateBinding CornerRadius}" Background="{StaticResource ControlBackground_Checked}" />
            <Path x:Name="DropDownIndicator" IsHitTestVisible="False" Fill="{StaticResource ControlElement_Normal}" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Margin="5,3,5,3" Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z" SnapsToDevicePixels="True">
              <Path.RenderTransform>
                <RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(telerik:RadSplitButton.ToggleContentRotateAngle)}"></RotateTransform>
              </Path.RenderTransform>
            </Path>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="buttonStyle" TargetType="telerik:RadButton">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="3" />
    <Setter Property="CornerRadius" Value="3 0 0 3" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadButton">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <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="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <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="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStatesGroup">
                <VisualState x:Name="Unfocused" />
                <VisualState x:Name="Focused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{TemplateBinding CornerRadius}" Background="{TemplateBinding Background}" />
            <ContentControl x:Name="Content" Foreground="{TemplateBinding Foreground}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadSplitButtonStyle" TargetType="telerik:RadSplitButton">
    <Setter Property="IsTabStop" Value="false" />
    <Setter Property="IsOpen" Value="false" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="TogglePartStyle" Value="{StaticResource toggleStyle}" />
    <Setter Property="ButtonPartStyle" Value="{StaticResource buttonStyle}" />
    <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="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadSplitButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed" />
                <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="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsCheckedState">
                <VisualState x:Name="UnChecked" />
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Checked}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="IsOpenState">
                <VisualState x:Name="Closed" />
                <VisualState x:Name="Opened">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedVisual" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Canvas.ZIndex)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Active}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DropDownButtonPosition">
                <VisualState x:Name="DropDownButtonAtLeft">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>0</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0,0,-1,0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DropDownButtonAtTop">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>0</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0,0,0,-1</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DropDownButtonAtRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>-1,0,0,0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DropDownButtonAtBottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>1</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>2</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0,-1,0,0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ButtonPartVisibility">
                <VisualState x:Name="ButtonInvisible">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>0</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.ColumnSpan)">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Int32>3</sys:Int32>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="IsTabStop">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Boolean>True</sys:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="ButtonVisible" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="BackgroundVisibility">
                <VisualState x:Name="BackgroundHidden">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity" To="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="BackgroundVisible" />
              </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="{TemplateBinding CornerRadius}" Background="{TemplateBinding Background}" />
            <!-- CheckedVisual -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Highlighted}" CornerRadius="{TemplateBinding CornerRadius}" Background="{StaticResource ControlBackground_Highlighted}" />
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              <telerik:RadToggleButton x:Name="DropDownPart" IsTabStop="false" Margin="0,-1,0,0" Grid.Column="1" Grid.Row="2" MinWidth="11" MinHeight="7" Visibility="{TemplateBinding DropDownIndicatorVisibility}" Style="{TemplateBinding TogglePartStyle}" IsBackgroundVisible="{TemplateBinding IsBackgroundVisible}" IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"></telerik:RadToggleButton>
              <telerik:RadButton x:Name="ButtonPart" Grid.Row="1" Grid.Column="1" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay,                Path=IsButtonPartVisible, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Style="{TemplateBinding ButtonPartStyle}" Padding="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" IsBackgroundVisible="{TemplateBinding IsBackgroundVisible}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"></telerik:RadButton>
            </Grid>
            <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="false" Placement="Bottom">
              <Grid>
                <Border x:Name="DropDownPopupBorder" BorderThickness="1" BorderBrush="{StaticResource ControlOuterBorder}" Background="{StaticResource ControlBackground}" CornerRadius="0" Margin="0" MinWidth="3" MinHeight="3" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}" MaxWidth="{TemplateBinding DropDownMaxWidth}" MaxHeight="{TemplateBinding DropDownMaxHeight}">
                  <ContentPresenter x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" ContentTemplate="{TemplateBinding DropDownContentTemplate}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}" />
                </Border>
              </Grid>
            </Popup>
            <!-- Focus -->
            <Border x:Name="CommonStatesWrapper" IsHitTestVisible="false">
              <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Background="{StaticResource ControlBackground_Focused}" />
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik:RadSplitButton" BasedOn="{StaticResource RadSplitButtonStyle}" />
  <!-- RadComboBox -->
  <ControlTemplate x:Key="EditableComboToggleButtonControlTemplate" TargetType="telerik:RadToggleButton">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Unfocused" />
          <VisualState x:Name="Focused" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="CheckedStates">
          <VisualState x:Name="Unchecked" />
          <VisualState x:Name="Checked">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BackgroundChecked">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IconChecked">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Indeterminate" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="Background" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
      <Border x:Name="BackgroundChecked" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ButtonBorder_Pressed}" Background="{StaticResource ButtonBackground_Pressed}" Visibility="Collapsed" />
      <Path x:Name="Icon" Margin="4 0" Fill="{StaticResource Icon_Normal}" Width="8" Height="4" Data="M0,0 4,4 8,0 6,0 4,2 2,0Z" />
      <Path x:Name="IconChecked" Margin="4 0" Visibility="Collapsed" Fill="{StaticResource Icon_Pressed}" Width="8" Height="4" Data="M0,0 4,4 8,0 6,0 4,2 2,0Z" />
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="NonEditableComboToggleButtonControlTemplate" TargetType="telerik:RadToggleButton">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" />
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Unfocused" />
          <VisualState x:Name="Focused" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="CheckedStates">
          <VisualState x:Name="Unchecked" />
          <VisualState x:Name="Checked">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BackgroundChecked">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IconChecked">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Indeterminate" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto" />
      </Grid.ColumnDefinitions>
      <Border x:Name="Background" Grid.ColumnSpan="2" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
      <Border x:Name="BackgroundChecked" Grid.ColumnSpan="2" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ButtonBorder_Pressed}" Background="{StaticResource ButtonBackground_Pressed}" Visibility="Collapsed" />
      <Path x:Name="Icon" Grid.Column="1" Margin="4 0" Fill="{StaticResource Icon_Normal}" Width="8" Height="4" Data="M0,0 4,4 8,0 6,0 4,2 2,0Z" />
      <Path x:Name="IconChecked" Grid.Column="1" Margin="4 0" Visibility="Collapsed" Fill="{StaticResource Icon_Pressed}" Width="8" Height="4" Data="M0,0 4,4 8,0 6,0 4,2 2,0Z" />
      <ContentControl x:Name="Content" Grid.Column="0" Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" IsTabStop="False" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="EditableComboToggleButtonStyle" TargetType="telerik:RadToggleButton">
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="IsTabStop" Value="True" />
    <Setter Property="Background" Value="{StaticResource ButtonBackground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ButtonBorder_Normal}" />
    <Setter Property="Template" Value="{StaticResource EditableComboToggleButtonControlTemplate}" />
  </Style>
  <Style x:Key="NonEditableComboToggleButtonStyle" TargetType="telerik:RadToggleButton">
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="IsTabStop" Value="True" />
    <Setter Property="Background" Value="{StaticResource ButtonBackground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ButtonBorder_Normal}" />
    <Setter Property="Template" Value="{StaticResource NonEditableComboToggleButtonControlTemplate}" />
  </Style>
  <ControlTemplate x:Key="EditableComboBox" TargetType="telerikInput:RadComboBox">
    <Grid x:Name="VisualRoot">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownOpenBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownOpenBorder" Storyboard.TargetProperty="BorderBrush">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver" />
          <VisualState x:Name="DropDownOpen">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Focus" />
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.BorderBrush)">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DropDownOpenBorder">
                <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="Focus">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Unfocused" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="WatermarkStates">
          <VisualState x:Name="WatermarkVisible">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Watermark" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="WatermarkInvisible" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="Auto" />
      </Grid.ColumnDefinitions>
      <Border x:Name="Background" Grid.ColumnSpan="2" IsHitTestVisible="False" Background="{StaticResource PickerBackground}" CornerRadius="3" />
      <Border x:Name="Border" Grid.ColumnSpan="2" IsHitTestVisible="False" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" />
      <Border x:Name="DropDownOpenBorder" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ButtonBorder_Pressed}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource PickerBackground}" CornerRadius="3" />
      <TextBox x:Name="PART_EditableTextBox" Grid.Column="0" BorderThickness="0" Padding="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" Background="{TemplateBinding Background}" VerticalAlignment="Stretch" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{TemplateBinding IsReadOnly}">
        <TextBox.Template>
          <ControlTemplate TargetType="TextBox">
            <Grid>
              <ScrollViewer x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" BorderBrush="Transparent" BorderThickness="0" IsTabStop="False" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
            </Grid>
          </ControlTemplate>
        </TextBox.Template>
      </TextBox>
      <telerik:RadToggleButton x:Name="PART_DropDownButton" Grid.Column="1" IsTabStop="False" ClickMode="Press" Style="{StaticResource EditableComboToggleButtonStyle}" />
      <Border x:Name="Focus" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ButtonBorder_Focus}" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" />
      <TextBlock x:Name="Watermark" Padding="{TemplateBinding Padding}" Text="{TemplateBinding EmptyText}" Opacity=".5" IsHitTestVisible="False" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="Collapsed" />
      <Popup x:Name="PART_Popup">
        <Border MinWidth="{TemplateBinding MinDropDownWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderThickness="1" BorderBrush="{StaticResource PopupBorder}" Background="{StaticResource PopupBackground}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <telerik:RadButton x:Name="PART_ClearButton" Grid.Row="0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}" Content="{TemplateBinding ClearSelectionButtonContent}" />
            <ScrollViewer x:Name="PART_ScrollViewer" Foreground="{TemplateBinding Foreground}" Grid.Row="1" Padding="1" BorderThickness="0" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
              <ItemsPresenter />
            </ScrollViewer>
          </Grid>
        </Border>
      </Popup>
    </Grid>
  </ControlTemplate>
  <!--NonEditableComboBox-->
  <ControlTemplate x:Key="NonEditableComboBox" TargetType="telerikInput:RadComboBox">
    <Grid x:Name="VisualRoot">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled" />
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver" />
          <VisualState x:Name="DropDownOpen">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Focus" />
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Focused">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Focus">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Unfocused" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="Background" IsHitTestVisible="False" Background="{TemplateBinding Background}" CornerRadius="3" />
      <telerik:RadToggleButton x:Name="PART_DropDownButton" Padding="{TemplateBinding Padding}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Foreground="{TemplateBinding Foreground}" Style="{StaticResource NonEditableComboToggleButtonStyle}" IsTabStop="False" ClickMode="Press" />
      <Border x:Name="Focus" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ButtonBorder_Focus}" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" />
      <Popup x:Name="PART_Popup">
        <Border MinWidth="{TemplateBinding MinDropDownWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderThickness="1" BorderBrush="{StaticResource PopupBorder}" Background="{StaticResource PopupBackground}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <telerik:RadButton x:Name="PART_ClearButton" Grid.Row="0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}" Content="{TemplateBinding ClearSelectionButtonContent}" />
            <ScrollViewer x:Name="PART_ScrollViewer" Foreground="{TemplateBinding Foreground}" Grid.Row="1" Padding="1" BorderThickness="0" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
              <ItemsPresenter />
            </ScrollViewer>
          </Grid>
        </Border>
      </Popup>
    </Grid>
  </ControlTemplate>
  <!--telerikInput:RadComboBoxItem-->
  <ControlTemplate x:Key="RadComboBoxItemTemplate" TargetType="telerikInput:RadComboBoxItem">
    <Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(TextBlock.Foreground)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemForeground_Selected}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Rectangle x:Name="Highlight" Fill="{StaticResource ComboBox_ItemBackground_Selected}" Visibility="Collapsed" />
        <ContentPresenter x:Name="Content" TextBlock.Foreground="{TemplateBinding Foreground}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="RadComboBoxItemStyle" TargetType="telerikInput:RadComboBoxItem">
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Template" Value="{StaticResource RadComboBoxItemTemplate}" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="Padding" Value="3 1" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  </Style>
  <Style TargetType="telerikInput:RadComboBoxItem" BasedOn="{StaticResource RadComboBoxItemStyle}" />
  <!--telerikInput:RadComboBox-->
  <Style x:Key="RadComboBoxStyle" TargetType="telerikInput:RadComboBox">
    <Setter Property="Padding" Value="5 3" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource PickerForeground}" />
    <Setter Property="BorderBrush" Value="{StaticResource PickerBorder_Normal}" />
    <Setter Property="Template" Value="{StaticResource NonEditableComboBox}" />
    <Setter Property="EditableTemplate" Value="{StaticResource EditableComboBox}" />
    <Setter Property="NonEditableTemplate" Value="{StaticResource NonEditableComboBox}" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  </Style>
  <Style TargetType="telerikInput:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle}" />
  <!-- RadNumericUpDown-->
  <Style x:Key="IncreaseRepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Focus" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Focus" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Focus">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Background" BorderBrush="{StaticResource ButtonBorder_Normal}" Background="{StaticResource ButtonBackground_Normal}" BorderThickness="1" CornerRadius="0 3 0 0" />
            <Border x:Name="Focus" BorderBrush="{StaticResource ButtonBorder_Focus}" BorderThickness="1" CornerRadius="0 3 0 0" Visibility="Collapsed" />
            <Path x:Name="Icon" Margin="3 4 3 3" Fill="{StaticResource Icon_Normal}" Width="8" Height="4" Data="M0,4 4,0 8,4 6,4 4,2 2,4Z" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecreaseRepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Focus" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Focus" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Focus">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Background" BorderBrush="{StaticResource ButtonBorder_Normal}" Background="{StaticResource ButtonBackground_Normal}" BorderThickness="1" CornerRadius="0 0 3 0" />
            <Border x:Name="Focus" BorderBrush="{StaticResource ButtonBorder_Focus}" BorderThickness="1" CornerRadius="0 0 3 0" Visibility="Collapsed" />
            <Path x:Name="Icon" Margin="3 3 3 4" Fill="{StaticResource Icon_Normal}" Width="8" Height="4" Data="M0,0 4,4 8,0 6,0 4,2 2,0Z" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <ControlTemplate x:Key="RadNumericUpDownTemplate" TargetType="telerikInput:RadNumericUpDown">
    <Grid x:Name="LayoutRoot">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textbox" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PickerForeground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver" />
          <VisualState x:Name="MouseOverTextHidden" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="TextBoxBehavior">
          <VisualState x:Name="ShowTextBox" />
          <VisualState x:Name="HideTextBox">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="textbox">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="increase">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Int32>0</sys:Int32>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Column)" Storyboard.TargetName="decrease">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Int32>0</sys:Int32>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ButtonsBehavior">
          <VisualState x:Name="ShowButtons" />
          <VisualState x:Name="HideButtons">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="increase">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="decrease">
                <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.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Focus">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="FocusedTextHidden" />
          <VisualState x:Name="Unfocused" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid.RowDefinitions>
        <RowDefinition Height="*" />
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition x:Name="TextColumn" Width="*" />
        <ColumnDefinition x:Name="ButtonsColumn" Width="Auto" />
      </Grid.ColumnDefinitions>
      <Border x:Name="Background" Grid.ColumnSpan="2" Grid.RowSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}" CornerRadius="3" />
      <Border x:Name="DisabledVisual" Visibility="Collapsed" Grid.ColumnSpan="2" Grid.RowSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource TextBoxBorder_Disabled}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" />
      <TextBox x:Name="textbox" Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" TabIndex="{TemplateBinding TabIndex}" BorderThickness="0" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
        <TextBox.Template>
          <ControlTemplate TargetType="TextBox">
            <Grid>
              <ScrollViewer x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" BorderBrush="Transparent" Background="Transparent" BorderThickness="0" IsTabStop="False" VerticalScrollBarVisibility="Auto" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
            </Grid>
          </ControlTemplate>
        </TextBox.Template>
      </TextBox>
      <RepeatButton x:Name="increase" Grid.Row="0" Grid.Column="1" IsTabStop="{TemplateBinding AreButtonsTabStops}" Style="{StaticResource IncreaseRepeatButtonStyle}" />
      <RepeatButton x:Name="decrease" Grid.Row="1" Grid.Column="1" IsTabStop="{TemplateBinding AreButtonsTabStops}" Style="{StaticResource DecreaseRepeatButtonStyle}" />
      <Border x:Name="Focus" Grid.RowSpan="2" Grid.ColumnSpan="2" CornerRadius="3" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ButtonBorder_Focus}" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadNumericUpDownStyle" TargetType="telerikInput:RadNumericUpDown">
    <Setter Property="Foreground" Value="{StaticResource PickerForeground}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Padding" Value="5 3" />
    <Setter Property="HorizontalContentAlignment" Value="Right" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Background" Value="{StaticResource PickerBackground}" />
    <Setter Property="BorderBrush" Value="{StaticResource PickerBorder_Normal}" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Template" Value="{StaticResource RadNumericUpDownTemplate}" />
  </Style>
  <Style TargetType="telerikInput:RadNumericUpDown" BasedOn="{StaticResource RadNumericUpDownStyle}" />
  <!-- RadColorPicker -->
  <Style TargetType="Button" x:Key="RadColorPicker_HeaderButtonStyle">
    <Setter Property="Foreground" Value="{StaticResource ControlHeader_Foreground}" />
    <Setter Property="FontWeight" Value="Normal" />
    <Setter Property="BorderBrush" Value="{StaticResource ColorPicker_HeaderButtonOuterColorStroke}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="border_mouseover" Storyboard.TargetProperty="Opacity">
                      <DiscreteDoubleKeyFrame KeyTime="0" Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="border_mouseover">
                      <DiscreteDoubleKeyFrame KeyTime="0" Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused" />
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" MinWidth="25" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <!-- normal -->
            <Border MinWidth="25" HorizontalAlignment="Left" Background="{StaticResource ColorPicker_TitleBackground}" BorderBrush="{StaticResource ColorPicker_TitleBorder}" BorderThickness="0 0 1 0" />
            <!-- MouseOver -->
            <Border x:Name="border_mouseover" BorderThickness="1" Grid.ColumnSpan="2" Opacity="0" CornerRadius="{StaticResource ColorPicker_HeaderButtonOuterBorder_CornerRadius}" BorderBrush="{StaticResource ColorPicker_HeaderButtonOuterBorder_MouseOver}" Background="{StaticResource ColorPicker_HeaderButtonInnerBackground_MouseOver}" />
            <Border Margin="2 2 3 2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="2" x:Name="rectangleborder">
              <Rectangle Stroke="{StaticResource ColorPicker_HeaderButtonInnerColorStroke}" Fill="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" MinWidth="14" MinHeight="14" VerticalAlignment="Center" Margin="1" />
            </Border>
            <ContentPresenter Grid.Column="1" x:Name="contentPresenter" Margin="7 0 0 0" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="Center" HorizontalAlignment="Left" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorButtonDefaultStyle" TargetType="Button">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid Height="25" Width="23" Background="Transparent">
            <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="Border" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Border" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused" />
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" Opacity="0" BorderThickness="1" BorderBrush="{StaticResource ControlOuterBorder_Highlighted}" Background="{StaticResource ControlBackground_Highlighted}" CornerRadius="{StaticResource ColorPicker_ButtonOuterBorder_LeftCornerRadius}" />
            <Grid Height="25" Width="23">
              <Grid.RowDefinitions>
                <RowDefinition Height="0.664*" />
                <RowDefinition Height="0.336*" />
              </Grid.RowDefinitions>
              <Path Fill="#FF364F87" Stretch="Fill" VerticalAlignment="Top" HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" Data="M3.8280001,4.8113337 C3.756,4.8113337 3.72,4.8593335 3.684,4.9673333 C3.6765001,4.9868336 3.6538124,5.0481458 3.6196642,5.141099 C3.5855157,5.2340522 3.5399063,5.3586459 3.4865625,5.5047083 C3.3798749,5.7968335 3.24225,6.1748333 3.1035001,6.5573335 C2.9647501,6.9398336 2.8248751,7.3268337 2.7136877,7.6369586 C2.6580937,7.7920213 2.6096718,7.927865 2.5721486,8.034318 C2.5346251,8.1407709 2.5080001,8.2178335 2.4960001,8.2553339 L4.8600001,8.2553339 C4.8464999,8.2103338 4.8236251,8.1315842 4.7937655,8.0276384 C4.7639065,7.9236932 4.7270627,7.7945528 4.6856251,7.6487713 C4.6027498,7.3572087 4.5015001,6.999084 4.401,6.6428337 C4.3004999,6.2865839 4.2007499,5.9322085 4.1208749,5.6481462 C4.0809374,5.506115 4.045969,5.3816619 4.0183597,5.2833414 C3.9907501,5.1850209 3.9705,5.1128335 3.96,5.0753336 C3.9359999,4.9853334 3.918,4.9193335 3.8985,4.8758335 C3.8789999,4.8323336 3.858,4.8113337 3.8280001,4.8113337 z M4.8959999,3.1193333 C4.9679999,3.1193333 4.9920001,3.1913338 5.0279999,3.3233337 C5.0565,3.4178338 5.0960622,3.5425212 5.1439219,3.6898727 C5.191781,3.8372245 5.2479377,4.0072398 5.3096251,4.1923962 C5.4330001,4.5627089 5.5784998,4.9935837 5.724,5.4248338 C5.8695002,5.8560839 6.0149999,6.2877088 6.1383748,6.6595211 C6.2000623,6.8454275 6.2562189,7.0163803 6.3040781,7.1648569 C6.3519378,7.3133335 6.3915,7.4393334 6.4200001,7.5353336 C6.4890003,7.7693338 6.5895,8.0843334 6.7040625,8.4302711 C6.818625,8.7762089 6.9472499,9.1530838 7.0724998,9.5108337 C7.1977501,9.8685837 7.3196249,10.207209 7.4206877,10.476646 C7.4712186,10.611364 7.5165467,10.728786 7.554492,10.822654 C7.5924377,10.916521 7.6230001,10.986834 7.6440001,11.027333 C7.7460003,11.225333 7.875,11.360333 8.0010004,11.445833 C8.1269999,11.531333 8.25,11.567333 8.3400002,11.567333 L8.7480001,11.567333 C8.8199997,11.567333 8.8319998,11.615334 8.8319998,11.675334 L8.8319998,11.903334 C8.8319998,11.975333 8.8199997,12.059334 8.724,12.059334 C8.6669998,12.059334 8.6085005,12.057084 8.5288124,12.053709 C8.4491253,12.050334 8.3482504,12.045834 8.2065001,12.041333 C8.0647507,12.036834 7.8821254,12.032333 7.638938,12.028958 C7.39575,12.025583 7.092,12.023334 6.7080002,12.023334 C6.4590001,12.023334 6.2460003,12.025583 6.0628123,12.028958 C5.8796248,12.032333 5.7262497,12.036834 5.5964999,12.041333 C5.4667501,12.045834 5.3606248,12.050334 5.2719374,12.053709 C5.18325,12.057084 5.112,12.059334 5.052,12.059334 C4.9920001,12.059334 4.9590001,12.041334 4.941,12.012834 C4.9230003,11.984333 4.9200001,11.945333 4.9200001,11.903334 L4.9200001,11.675334 C4.9200001,11.615334 4.9320002,11.567333 4.9920001,11.567333 L5.3280001,11.567333 C5.4899998,11.567333 5.598,11.537333 5.6565003,11.468333 C5.7150002,11.399334 5.724,11.291334 5.6880002,11.135334 C5.6610003,11.027334 5.6115003,10.850334 5.5501876,10.638834 C5.4888749,10.427334 5.41575,10.181334 5.3414998,9.9353342 C5.2672501,9.6893339 5.191875,9.4433336 5.1260624,9.2318335 C5.0602498,9.0203333 5.0039997,8.8433332 4.9679999,8.7353334 L2.3399999,8.7353334 C2.316,8.7983332 2.26125,8.9483337 2.1926248,9.1438961 C2.1240001,9.3394585 2.0415001,9.5805836 1.962,9.8258333 C1.8824999,10.071083 1.806,10.320458 1.749375,10.53252 C1.69275,10.744583 1.656,10.919333 1.656,11.015333 C1.656,11.147333 1.6830001,11.285334 1.755,11.390333 C1.827,11.495333 1.944,11.567333 2.1240001,11.567333 L2.5439999,11.567333 C2.6040001,11.567333 2.6370001,11.579333 2.655,11.597333 C2.6730001,11.615334 2.6760001,11.639334 2.6760001,11.663334 L2.6760001,11.927334 C2.6760001,12.023334 2.664,12.059334 2.5680001,12.059334 C2.529,12.059334 2.4690001,12.057084 2.3855624,12.053709 C2.302125,12.050334 2.19525,12.045834 2.0625,12.041333 C1.92975,12.036834 1.771125,12.032333 1.5841875,12.028958 C1.3972499,12.025583 1.1819999,12.023334 0.93599993,12.023334 C0.71700001,12.023334 0.53625,12.025583 0.3856875,12.028958 C0.23512499,12.032333 0.11475,12.036834 0.016499937,12.041333 C-0.18000001,12.050334 -0.28799999,12.059334 -0.37199995,12.059334 C-0.44400001,12.059334 -0.456,11.987333 -0.456,11.903334 L-0.456,11.675334 C-0.456,11.603333 -0.44400001,11.567333 -0.37199995,11.567333 L-0.059999958,11.567333 C0.083999999,11.567333 0.228,11.525333 0.36600009,11.438334 C0.50400001,11.351334 0.63599998,11.219334 0.75599998,11.039333 C0.77700001,11.007833 0.80868751,10.947646 0.84883589,10.864372 C0.88898438,10.781099 0.93759376,10.67474 0.99243748,10.550896 C1.102125,10.303208 1.23675,9.9855833 1.3785,9.6428337 C1.52025,9.3000832 1.669125,8.9322081 1.8073125,8.5840206 C1.9455,8.2358332 2.073,7.9073334 2.1719999,7.6433334 C2.184,7.6133337 2.2096875,7.546771 2.2456639,7.4526224 C2.2816405,7.3584743 2.3279061,7.2367396 2.3810623,7.096396 C2.487375,6.8157086 2.6212499,6.4605837 2.7554998,6.1028337 C2.88975,5.7450838 3.024375,5.3847084 3.1321876,5.0935211 C3.1860938,4.9479275 3.2332969,4.8196306 3.2703984,4.717607 C3.3075001,4.6155834 3.3345001,4.5398335 3.348,4.4993334 C3.3660002,4.4393334 3.3900001,4.3703337 3.3990002,4.2998333 C3.408,4.2293334 3.402,4.1573334 3.3599999,4.0913334 C3.3239999,4.0433335 3.276,3.9833336 3.276,3.9353333 C3.276,3.899334 3.3,3.8513336 3.3959999,3.8273335 C3.4919999,3.8063335 3.6127501,3.7710836 3.7426875,3.7268338 C3.8726249,3.6825836 4.0117497,3.6293337 4.1444998,3.5723338 C4.2772498,3.5153337 4.403625,3.4545836 4.5080624,3.3953338 C4.6124997,3.3360839 4.6949997,3.2783339 4.7399998,3.227334 C4.8000002,3.1673336 4.836,3.1193333 4.8959999,3.1193333 z" Width="9.91" Margin="-2 3 0 0" Height="9.537">
                <Path.RenderTransform>
                  <ScaleTransform ScaleX="1" ScaleY="1" />
                </Path.RenderTransform>
              </Path>
              <Rectangle Width="16" Margin="-2 0 0 0" Fill="{TemplateBinding Background}" Height="4.232" Grid.Row="1" VerticalAlignment="Top" />
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Background" Value="Black" />
  </Style>
  <Style x:Key="ToggleButtonIconStyle" TargetType="ToggleButton">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ToggleButton">
          <Grid Height="25" Width="11">
            <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="Border" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Border" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BackgroundChecked">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused" />
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" Opacity="0" BorderThickness="1" BorderBrush="{StaticResource ControlOuterBorder_Highlighted}" Background="{StaticResource ControlBackground_Highlighted}" CornerRadius="{StaticResource ColorPicker_ButtonOuterBorder_RightCornerRadius}" />
            <Border x:Name="BackgroundChecked" Visibility="Collapsed" BorderThickness="1" BorderBrush="{StaticResource ControlOuterBorder_Pressed}" Background="{StaticResource ControlBackground_Pressed}" CornerRadius="{StaticResource ColorPicker_ButtonOuterBorder_RightCornerRadius}" />
            <Path x:Name="Arrow" Fill="{StaticResource ControlElement_Normal}" Stretch="Fill" Stroke="{x:Null}" Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z" Width="5" Height="3" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--RadcolorPaletteViewItem-->
  <Style x:Key="RadColorPaletteViewItemStyle" TargetType="telerikInput:RadColorPaletteViewItem">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadColorPaletteViewItem">
          <Grid x:Name="RootElement" Margin="0" SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused" />
                <VisualState x:Name="Focused" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected" />
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ColorPaletteViewItem_OuterBorder_Selected}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="PositionStates">
                <VisualState x:Name="Top">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 1 1 0" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Single">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Middle">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="MinWidth" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="13" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Bottom">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="borderContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="1 0 1 1" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="color" MinHeight="11" MinWidth="11" Stretch="Fill" Margin="2 0" ToolTipService.ToolTip="{Binding }" Fill="{TemplateBinding Content}" />
            <Border MinHeight="13" MinWidth="13" BorderBrush="{StaticResource ColorPaletteViewItem_Border}" Margin="2 0" x:Name="borderContent" VerticalAlignment="Stretch" BorderThickness="1">
              <Border BorderThickness="1" x:Name="InnerborderContent" />
            </Border>
            <Border MinHeight="13" MinWidth="13" BorderBrush="{StaticResource ColorPaletteViewItem_OuterBorder_MouseOver}" Margin="2 0" x:Name="border" VerticalAlignment="Stretch" BorderThickness="1" Visibility="Collapsed" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Content" Value="Color" />
    <Setter Property="Color" Value="Green" />
  </Style>
  <Style TargetType="telerikInput:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStyle}" x:Key="DefaultStyle">
    <Setter Property="Color" Value="Black" />
  </Style>
  <Style TargetType="telerikInput:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStyle}" />
  <!--RadColorPaletteView-->
  <Style x:Key="RadColorPaletteViewStyle" TargetType="telerikInput:RadColorPaletteView">
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="ItemContainerStyle" Value="{StaticResource DefaultStyle}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadColorPaletteView">
          <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
            <ItemsPresenter x:Name="ItemsPresenter" Margin="0,2,0,2" />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <primitives:RadUniformGrid x:Name="uniformGrid" HorizontalAlignment="Stretch" ChildrenFlow="Vertical" VerticalAlignment="Stretch" Columns="10"></primitives:RadUniformGrid>
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Margin" Value="0" />
  </Style>
  <Style TargetType="telerikInput:RadColorPaletteView" BasedOn="{StaticResource RadColorPaletteViewStyle}" />
  <!--RadcolorPaletteSelector-->
  <Style x:Key="RadColorSelectorStyle" TargetType="telerikInput:RadColorSelector">
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource ColorPicker_Foreground}" />
    <Setter Property="FontWeight" Value="Bold" />
    <Setter Property="FontStyle" Value="Normal" />
    <Setter Property="MainPaletteItemsStyle" Value="{StaticResource DefaultStyle}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadColorSelector">
          <Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="2" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid x:Name="RootElement" Margin="0" Background="{TemplateBinding Background}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
              </Grid.RowDefinitions>
              <Button Content="{TemplateBinding NoColorText}" x:Name="PaletteHeader" Grid.Row="0" Background="{TemplateBinding Background}" Tag="{Binding AutomaticColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource converter}}" Style="{StaticResource RadColorPicker_HeaderButtonStyle}" />
              <Border Margin="0 0 0 3" Grid.Row="1" Background="{StaticResource ColorPicker_TitleBackground}" BorderBrush="{StaticResource ColorPicker_TitleBorder}" BorderThickness="0 0 0 1">
                <TextBlock Margin="10,2,2,2" x:Name="mainPaletteHeader" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding MainPaletteHeaderText}" />
              </Border>
              <telerikInput:RadColorPaletteView Background="{TemplateBinding Background}" Grid.Row="2" Margin="0,0,0,-3" VerticalAlignment="Center" x:Name="HeaderPalette" BorderBrush="Transparent" BorderThickness="0">
                <telerikInput:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <primitives:RadUniformGrid Background="Transparent" Columns="10"></primitives:RadUniformGrid>
                  </ItemsPanelTemplate>
                </telerikInput:RadColorPaletteView.ItemsPanel>
              </telerikInput:RadColorPaletteView>
              <telerikInput:RadColorPaletteView Grid.Row="3" Margin="0 5 0 2" x:Name="MainPalette" ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}" BorderBrush="Transparent" BorderThickness="0" Background="{TemplateBinding Background}" />
              <Border Margin="0 2 0 3" x:Name="StandardPaletteBorder" Grid.Row="4" Background="{StaticResource ColorPicker_TitleBackground}" BorderBrush="{StaticResource ColorPicker_TitleBorder}" BorderThickness="0 0 0 1">
                <TextBlock Margin="10,2,2,2" x:Name="standardPaletteHeader" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding StandardPaletteHeaderText}" />
              </Border>
              <telerikInput:RadColorPaletteView x:Name="StandartPalette" Margin="0 0 0 1" VerticalAlignment="Center" Grid.Row="5" BorderBrush="Transparent" BorderThickness="0" Background="{TemplateBinding Background}">
                <telerikInput:RadColorPaletteView.ItemsPanel>
                  <ItemsPanelTemplate>
                    <primitives:RadUniformGrid Background="Transparent" Columns="10"></primitives:RadUniformGrid>
                  </ItemsPanelTemplate>
                </telerikInput:RadColorPaletteView.ItemsPanel>
              </telerikInput:RadColorPaletteView>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadColorSelector" BasedOn="{StaticResource RadColorSelectorStyle}" />
  <!--ColorPicker-->
  <Style x:Key="RadColorPickerStyle" TargetType="telerikInput:RadColorPicker">
    <Style.Setters>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="telerikInput:RadColorPicker">
            <Grid x:Name="Root" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver">
                    <Storyboard Duration="0">
                      <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Over_back" Storyboard.TargetProperty="Opacity">
                        <DiscreteDoubleKeyFrame KeyTime="0" Value="1" />
                      </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Selected">
                    <Storyboard Duration="0">
                      <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Over_back" Storyboard.TargetProperty="Opacity">
                        <DiscreteDoubleKeyFrame KeyTime="0" Value="1" />
                      </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Disabled" />
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Grid x:Name="Placement" Width="34">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="23" />
                  <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border x:Name="Over_back" Opacity="0" Height="25" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Background="{StaticResource ColorPicker_ButtonBackground_MouseOver}" BorderBrush="{StaticResource ColorPicker_ButtonBorder_MouseOver}" BorderThickness="1" Width="34" Grid.ColumnSpan="2" />
                <Button x:Name="LeftButton" Style="{TemplateBinding ColorButtonStyle}" HorizontalContentAlignment="Center" />
                <ToggleButton Grid.Column="1" x:Name="ToggleButtonElement" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" Style="{TemplateBinding ExpanderButtonStyle}" Cursor="Hand" />
              </Grid>
              <Popup x:Name="PART_Popup" AllowsTransparency="True" StaysOpen="False" IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
                <Grid>
                  <Border x:Name="DropDownBorder">
                    <telerikInput:RadColorSelector x:Name="ColorSelector" MainPaletteItemsStyle="{TemplateBinding MainPaletteItemsStyle}" MainPaletteColumnsCount="{TemplateBinding MainPaletteColumnsCount}" MainPaletteOrientation="{TemplateBinding MainPaletteOrientation}" MainPaletteHeaderText="{TemplateBinding MainPaletteHeaderText}" MainPalette="{TemplateBinding MainPalette}" HeaderPalette="{TemplateBinding HeaderPalette}" HeaderPaletteVisibility="{TemplateBinding HeaderPaletteVisibility}" StandardPalette="{TemplateBinding StandardPalette}" StandardPaletteVisibility="{TemplateBinding StandardPaletteVisibility}" StandardPaletteHeaderText="{TemplateBinding StandardPaletteHeaderText}" AutomaticColor="{TemplateBinding AutomaticColor}" NoColorText="{TemplateBinding NoColorText}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" NoColorVisibility="{TemplateBinding NoColorVisibility}" SelectedColor="{TemplateBinding SelectedColor}" Background="{TemplateBinding Background}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" Foreground="{TemplateBinding Foreground}" />
                  </Border>
                </Grid>
              </Popup>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
      <Setter Property="MainPaletteColumnsCount" Value="10" />
      <Setter Property="MainPaletteOrientation" Value="Vertical" />
      <Setter Property="MainPalette" Value="Office" />
      <Setter Property="HeaderPaletteVisibility" Value="Visible" />
      <Setter Property="StandardPaletteVisibility" Value="Visible" />
      <Setter Property="NoColorVisibility" Value="Visible" />
      <Setter Property="SelectedColor" Value="Black" />
      <Setter Property="StandardPalette" Value="Standard" />
      <Setter Property="HeaderPalette" Value="Office" />
      <Setter Property="MainPaletteItemsStyle" Value="{StaticResource DefaultStyle}" />
      <Setter Property="ColorButtonStyle" Value="{StaticResource ColorButtonDefaultStyle}" />
      <Setter Property="ExpanderButtonStyle" Value="{StaticResource ToggleButtonIconStyle}" />
      <Setter Property="HorizontalAlignment" Value="Left" />
      <Setter Property="VerticalAlignment" Value="Top" />
      <Setter Property="Background" Value="{StaticResource ControlBackground}" />
      <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="FontStyle" Value="Normal" />
      <Setter Property="FontWeight" Value="Bold" />
      <Setter Property="Foreground" Value="{StaticResource ControlHeader_Foreground}" />
      <Setter Property="AutomaticColor" Value="Black" />
    </Style.Setters>
  </Style>
  <Style TargetType="telerikInput:RadColorPicker" BasedOn="{StaticResource RadColorPickerStyle}" />
  <!-- RadColorEditor -->
  <colorPickerConverters:HueConverter x:Key="HueConverter" />
  <colorPickerConverters:EnumConverter x:Key="EnumConverter" />
  <colorMode:ColorModeCollection x:Key="ColorModeCollection" />
  <LinearGradientBrush x:Key="HueBrush" StartPoint="0.5,0.025" EndPoint="0.5,1">
    <GradientStop Color="#FFFF0000" />
    <GradientStop Color="#FEFFFF00" Offset="0.167" />
    <GradientStop Color="#FE00FF00" Offset="0.333" />
    <GradientStop Color="#FE00FFFF" Offset="0.5" />
    <GradientStop Color="#FE0000FF" Offset="0.667" />
    <GradientStop Color="#FEFF00FF" Offset="0.833" />
    <GradientStop Color="#FFFF0000" Offset="1.0" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="SaturationValueBrush1" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#FFFFFFFF" />
    <GradientStop Color="#00FFFFFF" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="SaturationValueBrush2" EndPoint="0.5,0" StartPoint="0.5,1">
    <GradientStop Color="#FF000000" Offset="0" />
    <GradientStop Color="#00000000" Offset="1" />
  </LinearGradientBrush>
  <Style TargetType="Thumb" x:Key="ThumbStyle">
    <Setter Property="Width" Value="8" />
    <Setter Property="Height" Value="10" />
    <Setter Property="IsTabStop" Value="True" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Background" Value="{StaticResource  ControlBackground_Normal}" />
    <Setter Property="BorderThickness" Value="{StaticResource  SliderThumb_OuterBorder_Normal}" />
    <Setter Property="Focusable" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Thumb">
          <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_Focused}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_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>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
            <Border x:Name="FocusVisual" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Visibility="Collapsed" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--ColorEditor-->
  <Style TargetType="pad:Pad">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="pad:Pad">
          <Grid Background="Transparent">
            <Canvas x:Name="Canvas">
              <ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}" />
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="RadColorEditorStyle" TargetType="telerikInput:RadColorEditor">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="Padding" Value="12" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadColorEditor">
          <Border x:Name="LayoutRoot" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="ColorModeStates">
                <VisualState x:Name="Rgb">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RgbTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HlsTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HsvTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CmykTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Hls">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RgbTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HlsTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HsvTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CmykTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Hsv">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RgbTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HlsTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HsvTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CmykTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Cmyk">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RgbTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HlsTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HsvTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CmykTemplate" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" MinWidth="170" />
                <ColumnDefinition Width="170" />
              </Grid.ColumnDefinitions>
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                  <ColumnDefinition Width="20" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="*" />
                  <RowDefinition Height="20" />
                </Grid.RowDefinitions>
                <Grid Margin="0 0 3 3">
                  <Rectangle Fill="{Binding PointerRelativePosition.Y, ElementName=HuePad, Converter={StaticResource HueConverter}}" />
                  <Rectangle Fill="{StaticResource SaturationValueBrush1}" />
                  <Rectangle Fill="{StaticResource SaturationValueBrush2}" />
                  <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <pad:Pad x:Name="SaturationValuePad" MovementDirection="Both">
                      <Grid>
                        <Ellipse Stroke="Black" StrokeThickness="1" Width="12" Height="12" />
                        <Ellipse Stroke="White" StrokeThickness="1" Width="10" Height="10" />
                      </Grid>
                    </pad:Pad>
                  </Border>
                </Grid>
                <Grid Grid.Column="1" Margin="0 0 0 3">
                  <Rectangle Fill="{StaticResource HueBrush}" />
                  <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <pad:Pad x:Name="HuePad" MovementDirection="Y">
                      <Grid Width="18" Height="7">
                        <Path Data="M0,0 L3.5085413,3.5085411 L0,7.0170822 z" Fill="Black" HorizontalAlignment="Left" Stretch="Fill" Width="3.5" Height="7" />
                        <Path Data="M0.06,3.5 L4,0 L4,7 L0.06,3.515625 z" Fill="Black" HorizontalAlignment="Right" Stretch="Fill" Width="3.5" Height="7" />
                      </Grid>
                    </pad:Pad>
                  </Border>
                </Grid>
                <Grid Height="20" Grid.Row="1" Margin="0 0 3 0">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="20" />
                  </Grid.ColumnDefinitions>
                  <Border x:Name="ChessBoardRect" Grid.ColumnSpan="2" Background="Black" BorderThickness="1 1 2 1">
                    <Border.Effect>
                      <effects:ChessboardEffect />
                    </Border.Effect>
                  </Border>
                  <Border x:Name="PART_InitialColor" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 1 0 1" Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InitialColor, Converter={StaticResource converter}}">
                    <ToolTipService.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="ColorEditorInitialColor" />
                    </ToolTipService.ToolTip>
                  </Border>
                  <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 1 1" Grid.Column="1" Margin="-1 0 0 0" Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedColor, Converter={StaticResource converter}}">
                    <ToolTipService.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="ColorEditorSelectedColor" />
                    </ToolTipService.ToolTip>
                  </Border>
                  <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Grid.Column="2" Margin="1 0 0 0" Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=PreviousColor, Converter={StaticResource converter}}">
                    <ToolTipService.ToolTip>
                      <TextBlock telerik:LocalizationManager.ResourceKey="ColorEditorPreviousColor" />
                    </ToolTipService.ToolTip>
                  </Border>
                </Grid>
              </Grid>
              <Grid Grid.Column="1" Margin="10 0 0 0">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto" />
                  <RowDefinition Height="Auto" />
                  <RowDefinition Height="Auto" />
                  <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <telerikInput:RadComboBox IsEditable="True" IsReadOnly="True" Width="145" HorizontalAlignment="Right" Margin="12 0 0 10" ItemsSource="{Binding Source={StaticResource ColorModeCollection}}" SelectedIndex="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColorMode, Mode=TwoWay, Converter={StaticResource EnumConverter}}" />
                <!-- RGB -->
                <Grid x:Name="RgbTemplate" Grid.Row="1" Visibility="Collapsed">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="11" />
                    <ColumnDefinition Width="57" />
                    <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
                  <TextBlock Text="R" Grid.Row="0" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="G" Grid.Row="1" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="B" Grid.Row="2" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="0" Grid.Column="1" Padding="0 0 3 0" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Red, Mode=TwoWay, FallbackValue=0}" IsClearButtonVisible="False" FormatString="{}{0:n0}" Placeholder=" " Mask="#3" HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="255" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="1" Grid.Column="1" Padding="0 0 3 0" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Green, Mode=TwoWay, FallbackValue=0}" Mask="#3" IsClearButtonVisible="False" FormatString="{}{0:n0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="255" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="2" Grid.Column="1" Padding="0 0 3 0" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Blue, Mode=TwoWay, FallbackValue=0}" Mask="#3" IsClearButtonVisible="False" FormatString="{}{0:n0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="255" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="RgbSliderRed" Background="{StaticResource TextBoxBackground}" Maximum="255" SmallChange="1" LargeChange="1" ThumbStyle="{StaticResource ThumbStyle}" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Red, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="RgbSliderGreen" Background="{StaticResource TextBoxBackground}" Maximum="255" SmallChange="1" LargeChange="1" ThumbStyle="{StaticResource ThumbStyle}" Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Green, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="RgbSliderBlue" Background="{StaticResource TextBoxBackground}" Maximum="255" SmallChange="1" LargeChange="1" ThumbStyle="{StaticResource ThumbStyle}" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Blue, Mode=TwoWay}" />
                </Grid>
                <!-- HLS -->
                <Grid x:Name="HlsTemplate" Grid.Row="1" Visibility="Collapsed">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="11" />
                    <ColumnDefinition Width="57" />
                    <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
                  <TextBlock Text="H" Grid.Row="0" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="L" Grid.Row="1" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="S" Grid.Row="2" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="0" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Hue, Mode=TwoWay, FallbackValue=0}" IsClearButtonVisible="False" FormatString="{}{0:n0}°" Placeholder=" " Mask="#3°" HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="360" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="1" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Luminance, Mode=TwoWay, FallbackValue=0}" Mask="p3" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="2" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Saturation, Mode=TwoWay, FallbackValue=0}" Mask="p3" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="HlsSliderHue" Background="{StaticResource TextBoxBackground}" Grid.Row="0" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" Maximum="360" SmallChange="1" LargeChange="1" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Hue, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="HlsSliderLuminance" Background="{StaticResource TextBoxBackground}" Grid.Row="1" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" SmallChange="0.01" LargeChange="0.01" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Luminance, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="HlsSliderSaturation" Background="{StaticResource TextBoxBackground}" Grid.Row="2" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" SmallChange="0.01" LargeChange="0.01" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Saturation, Mode=TwoWay}" />
                </Grid>
                <!-- HSV -->
                <Grid x:Name="HsvTemplate" Grid.Row="1" Visibility="Collapsed">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="11" />
                    <ColumnDefinition Width="57" />
                    <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
                  <TextBlock Text="H" Grid.Row="0" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="S" Grid.Row="1" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="V" Grid.Row="2" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="0" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Hue, Mode=TwoWay, FallbackValue=0}" IsClearButtonVisible="False" FormatString="{}{0:n0}°" Placeholder=" " Mask="#3°" HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="360" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="1" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Saturation, Mode=TwoWay, FallbackValue=0}" Mask="p3" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="2" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Value, Mode=TwoWay, FallbackValue=0}" Mask="p3" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="HsvSliderHue" Background="{StaticResource TextBoxBackground}" Grid.Row="0" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" Maximum="360" SmallChange="1" LargeChange="1" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Hue, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="HsvSliderSaturation" Background="{StaticResource TextBoxBackground}" Grid.Row="1" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" SmallChange="0.01" LargeChange="0.01" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Saturation, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="HsvSliderValue" Background="{StaticResource TextBoxBackground}" Grid.Row="2" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" SmallChange="0.01" LargeChange="0.01" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Value, Mode=TwoWay}" />
                </Grid>
                <!-- CMYK -->
                <Grid x:Name="CmykTemplate" Grid.Row="1" Visibility="Collapsed">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="11" />
                    <ColumnDefinition Width="57" />
                    <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
                  <TextBlock Text="C" Grid.Row="0" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="M" Grid.Row="1" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="Y" Grid.Row="2" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <TextBlock Text="K" Grid.Row="3" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="0" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Cyan, Mode=TwoWay, FallbackValue=0}" Mask="p3" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="1" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Magenta, Mode=TwoWay, FallbackValue=0}" Mask="p3" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="2" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Yellow, Mode=TwoWay, FallbackValue=0}" Mask="p3" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerikInput:RadMaskedNumericInput Margin="4 1 5 1" Grid.Row="3" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Key, Mode=TwoWay, FallbackValue=0}" Mask="p3" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="CmykSliderCyan" Background="{StaticResource TextBoxBackground}" Grid.Row="0" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" SmallChange="0.01" LargeChange="0.01" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Cyan, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="CmykSliderMagenta" Background="{StaticResource TextBoxBackground}" Grid.Row="1" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" SmallChange="0.01" LargeChange="0.01" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Magenta, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="CmykSliderYellow" Background="{StaticResource TextBoxBackground}" Grid.Row="2" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" SmallChange="0.01" LargeChange="0.01" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Yellow, Mode=TwoWay}" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="CmykSliderKey" Background="{StaticResource TextBoxBackground}" Grid.Row="3" ThumbStyle="{StaticResource ThumbStyle}" Grid.Column="2" SmallChange="0.01" LargeChange="0.01" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Key, Mode=TwoWay}" />
                </Grid>
                <!-- Alpha -->
                <Grid Grid.Row="2">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="58" />
                    <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
                  <TextBlock Text="A" Grid.Column="0" FontSize="12" VerticalAlignment="Center" />
                  <telerikInput:RadMaskedNumericInput Margin="5 1" Grid.Column="1" Height="22" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.SelectedColorViewModel.Alpha, Mode=TwoWay, FallbackValue=0}" IsClearButtonVisible="False" FormatString="{}{0:p0}" Placeholder=" " Mask="p3" HorizontalAlignment="Stretch" maskedInput:MaskedInputExtensions.Maximum="1" maskedInput:MaskedInputExtensions.Minimum="0" maskedInput:MaskedInputExtensions.CoerceToMaximum="True" UpdateValueEvent="LostFocus" />
                  <telerik:RadSlider IsMoveToPointEnabled="True" x:Name="SliderAlpha" Background="{StaticResource TextBoxBackground}" SmallChange="0.01" ThumbStyle="{StaticResource ThumbStyle}" LargeChange="0.01" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" Value="{Binding  RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.SelectedColorViewModel.Alpha, Mode=TwoWay}" />
                </Grid>
                <!-- Hex color -->
                <Grid Grid.Row="3">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="70" />
                  </Grid.ColumnDefinitions>
                  <TextBlock Text="#" Grid.Column="0" FontSize="14" VerticalAlignment="Center" />
                  <TextBox Grid.Column="1" Margin="0 3 0 0" colorEditorHelpers:TextBoxHelper.UpdateTextBindingOnKeyPress="True" Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hex.Value, Mode=TwoWay}" />
                </Grid>
              </Grid>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadColorEditor" BasedOn="{StaticResource RadColorEditorStyle}" />
  <!-- RadMaskedTextBox -->
  <Style x:Key="ExtendedTextBoxStyle" TargetType="telerikMaskedTextBox:ExtendedTextBox">
    <Setter Property="AcceptsReturn" Value="False" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikMaskedTextBox:ExtendedTextBox">
          <Grid x:Name="RootElement">
            <Border x:Name="Border" Opacity="1" CornerRadius="1" Padding="{TemplateBinding Padding}" Background="Transparent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Grid Cursor="IBeam">
                <ScrollViewer x:Name="ContentElement" Foreground="Orange" Padding="0" BorderBrush="Transparent" BorderThickness="0" IsTabStop="False" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style BasedOn="{StaticResource ExtendedTextBoxStyle}" TargetType="telerikMaskedTextBox:ExtendedTextBox" />
  <Style TargetType="telerikInput:RadMaskedTextBox" x:Key="RadMaskedTextBoxStyle">
    <Setter Property="Mask" Value="aaaa"></Setter>
    <Setter Property="MaskType" Value="Standard" />
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="IsReadOnly" Value="False" />
    <Setter Property="Placeholder" Value="_" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="Background" Value="{StaticResource TextBoxBackground}" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="2 0" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadMaskedTextBox">
          <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="ReadOnly">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MaskedTextBoxBackground_ReadOnly}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ExtendedTextBox" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusedVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Focused">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusedVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="EmptyStates">
                <VisualState x:Name="NonEmpty" />
                <VisualState x:Name="Empty">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EmptyContentPresenter" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" x:Name="InnerBorder">
              <Grid>
                <telerikMaskedTextBox:ExtendedTextBox x:Name="PART_ExtendedTextBox" Cursor="{TemplateBinding Cursor}" CaretBrush="#FFDDDDDD" TabIndex="{TemplateBinding TabIndex}" IsTabStop="True" Foreground="{TemplateBinding Foreground}" IsReadOnly="{TemplateBinding IsReadOnly}" Margin="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                <Border x:Name="EmptyContentPresenter" IsHitTestVisible="False" Visibility="Collapsed">
                  <ContentControl x:Name="ContentElement" IsTabStop="False" FontStyle="Italic" Foreground="{TemplateBinding Foreground}" Content="{TemplateBinding EmptyContent}" ContentTemplate="{TemplateBinding EmptyContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
                </Border>
                <!--Error Visual Element-->
              </Grid>
            </Border>
            <Border x:Name="FocusedVisual" Visibility="Collapsed" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
            <Border x:Name="DisabledVisual" Visibility="Collapsed" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Disabled}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadMaskedTextBox" BasedOn="{StaticResource RadMaskedTextBoxStyle}" />
  <!-- RadDateTimePicker -->
  <ControlTemplate x:Key="HeaderedContentControlControlTemplate" TargetType="HeaderedContentControl">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Border Grid.Row="0" MinHeight="32" BorderThickness="1" BorderBrush="{StaticResource HeaderBorder}" Background="{StaticResource HeaderBackground}">
        <ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
      </Border>
      <Border Grid.Row="1" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
        <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
      </Border>
    </Grid>
  </ControlTemplate>
  <Style x:Key="HeaderedContentControlStyle" TargetType="HeaderedContentControl">
    <Setter Property="BorderThickness" Value="1 0 1 1" />
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlBorder}" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="Template" Value="{StaticResource HeaderedContentControlControlTemplate}" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="IsTabStop" Value="False" />
  </Style>
  <ControlTemplate x:Key="RadClockItemControlTemplate" TargetType="telerikInput:RadClockItem">
    <Border x:Name="LayoutRoot" Background="Transparent" Padding="0 0 1 1">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Unfocused" />
          <VisualState x:Name="Focused" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RootElement" />
            </Storyboard>
          </VisualState>
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="SelectionStates">
          <VisualState x:Name="Unselected" />
          <VisualState x:Name="Selected">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation To="0" Duration="0:0:0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual" />
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" />
        <Border x:Name="MouseOverVisual" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Background="{StaticResource DateTimePicker_ItemBackground_MouseOver}" BorderBrush="{StaticResource DateTimePicker_ItemBorder_MouseOver}" />
        <Border x:Name="SelectedVisual" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" BorderBrush="{StaticResource DateTimePicker_ItemBorder_Selected}" Background="{StaticResource DateTimePicker_ItemBackground_Selected}" />
        <ContentControl x:Name="Content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Foreground="{StaticResource ButtonForeground_Normal}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="ClockItemStyle" TargetType="telerikInput:RadClockItem">
    <Setter Property="Margin" Value="0" />
    <Setter Property="Padding" Value="3 2 3 3" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Template" Value="{StaticResource RadClockItemControlTemplate}" />
  </Style>
  <Style TargetType="telerikInput:RadClockItem" BasedOn="{StaticResource ClockItemStyle}" />
  <ControlTemplate x:Key="RadClockControlTemplate" TargetType="telerikInput:RadClock">
    <HeaderedContentControl Style="{StaticResource HeaderedContentControlStyle}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
      <HeaderedContentControl.Header>
        <ContentPresenter Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" MinHeight="16" />
      </HeaderedContentControl.Header>
      <HeaderedContentControl.Content>
        <ItemsPresenter Grid.Row="1" Margin="1 1 0 0" VerticalAlignment="Bottom" />
      </HeaderedContentControl.Content>
    </HeaderedContentControl>
  </ControlTemplate>
  <Style x:Key="RadClockStyle" TargetType="telerikInput:RadClock">
    <Setter Property="Foreground" Value="{StaticResource PickerForeground}" />
    <Setter Property="Padding" Value="8 7" />
    <Setter Property="BorderThickness" Value="1 0 1 1" />
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlBorder}" />
    <!--<Setter Property="telerik:LocalizationManager.ResourceKey" Value="Clock" />-->
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="StartTime" Value="0:0:0" />
    <Setter Property="EndTime" Value="23:59:0" />
    <Setter Property="ItemContainerStyle" Value="{StaticResource ClockItemStyle}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <primitives:RadUniformGrid Columns="4" />
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="ItemTemplate">
      <Setter.Value>
        <DataTemplate>
          <TextBlock Text="{Binding}" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" />
        </DataTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template" Value="{StaticResource RadClockControlTemplate}" />
  </Style>
  <Style TargetType="telerikInput:RadClock" BasedOn="{StaticResource RadClockStyle}" />
  <ControlTemplate x:Key="RepeatButtonBackControlTemplate" TargetType="RepeatButton">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Icon" />
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="Background" CornerRadius="1" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
      <Border x:Name="MouseOverVisual" CornerRadius="1" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ButtonBorder_MouseOver}" Background="{StaticResource ButtonBackground_MouseOver}" />
      <Path x:Name="Icon" Data="M5,0 L0,2.5 5,5Z" Fill="{StaticResource ButtonForeground_Normal}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="RepeatButtonNextControlTemplate" TargetType="RepeatButton">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Icon" />
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Fill">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="Background" CornerRadius="1" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
      <Border x:Name="MouseOverVisual" CornerRadius="1" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ButtonBorder_MouseOver}" Background="{StaticResource ButtonBackground_MouseOver}" />
      <Path x:Name="Icon" Data="M0,0 L5,2.5 0,5Z" Fill="{StaticResource ButtonForeground_Normal}" Stretch="None" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="RepeatButtonBaseStyle" TargetType="RepeatButton">
    <Setter Property="MinWidth" Value="22" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
  </Style>
  <Style x:Key="RepeatButtonBackStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonBaseStyle}">
    <Setter Property="Template" Value="{StaticResource RepeatButtonBackControlTemplate}" />
  </Style>
  <Style x:Key="RepeatButtonNextStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonBaseStyle}">
    <Setter Property="Template" Value="{StaticResource RepeatButtonNextControlTemplate}" />
  </Style>
  <ControlTemplate x:Key="CalendarHeaderButtonControlTemplate" TargetType="Button">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Content" />
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Background)" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.BorderBrush)" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="Background" CornerRadius="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
      <Border x:Name="MouseOverVisual" CornerRadius="1" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ButtonBorder_MouseOver}" Background="{StaticResource ButtonBackground_MouseOver}" />
      <ContentControl x:Name="Content" Foreground="{StaticResource ButtonForeground_Normal}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="CalendarHeaderButtonStyle" TargetType="Button">
    <Setter Property="Template" Value="{StaticResource CalendarHeaderButtonControlTemplate}" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Margin" Value="2" />
  </Style>
  <ControlTemplate x:Key="CalendarButtonControlTemplate" TargetType="calendar:CalendarButton">
    <Border x:Name="LayoutRoot" Padding="0 0 1 1" Background="Transparent">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content" />
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="IsInAnotherView" />
          <VisualState x:Name="IsNotFromCurrentView">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CalendarButtonAnotherViewForeground}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ButtonType">
          <VisualState x:Name="Year" />
          <VisualState x:Name="Decade" />
          <VisualState x:Name="Date" />
          <VisualState x:Name="WeekName" />
          <VisualState x:Name="WeekNumber">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(ContentControl.Foreground)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource WeekNumbersForeground}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TodayDate">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Today">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Month" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Unfocused" />
          <VisualState x:Name="Focused" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="SelectionStates">
          <VisualState x:Name="Unselected" />
          <VisualState x:Name="Selected">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SelectedVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimation To="0" Duration="0:0:0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual" />
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid>
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" />
        <Border x:Name="SelectedVisual" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" BorderBrush="{StaticResource DateTimePicker_ItemBorder_Selected}" Background="{StaticResource DateTimePicker_ItemBackground_Selected}" />
        <Border x:Name="MouseOverVisual" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Background="{StaticResource DateTimePicker_ItemBackground_MouseOver}" BorderBrush="{StaticResource DateTimePicker_ItemBorder_MouseOver}" />
        <ContentControl x:Name="Content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Foreground="{StaticResource ButtonForeground_Normal}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
        <Border x:Name="Today" BorderBrush="{StaticResource CalendarButtonBorder_Today}" BorderThickness="1" CornerRadius="1" Visibility="Collapsed" />
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="CalendarButtonStyle" TargetType="calendar:CalendarButton">
    <Setter Property="Margin" Value="0" />
    <Setter Property="Padding" Value="15 2" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="2" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template" Value="{StaticResource CalendarButtonControlTemplate}" />
  </Style>
  <Style TargetType="calendar:CalendarButton" BasedOn="{StaticResource CalendarButtonStyle}" />
  <ItemsPanelTemplate x:Key="MonthViewItemsPanelTemplate">
    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" FirstColumn="1" VerticalAlignment="Stretch" Rows="7" Columns="8" />
  </ItemsPanelTemplate>
  <ItemsPanelTemplate x:Key="YearViewPanelTemplate">
    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4" />
  </ItemsPanelTemplate>
  <ItemsPanelTemplate x:Key="DecadeViewPanelTemplate">
    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4" />
  </ItemsPanelTemplate>
  <ItemsPanelTemplate x:Key="CenturyViewPanelTemplate">
    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4" />
  </ItemsPanelTemplate>
  <ControlTemplate x:Key="CalendarViewControlTemplate" TargetType="calendar:CalendarView">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Border Visibility="{TemplateBinding HeaderVisibility}" BorderThickness="0 0 0 1" Background="{StaticResource CalendarView_SubHeaderBackground}" BorderBrush="{StaticResource HeaderBorder}">
        <ContentPresenter Grid.Row="0" HorizontalAlignment="Center" Margin="5" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" />
      </Border>
      <ItemsPresenter Grid.Row="1" Margin="1 1 0 0" />
      <Rectangle Grid.Row="1" Width="241" Height="155" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="CalendarViewStyle" TargetType="calendar:CalendarView">
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template" Value="{StaticResource CalendarViewControlTemplate}" />
  </Style>
  <Style TargetType="calendar:CalendarView" BasedOn="{StaticResource CalendarViewStyle}" />
  <ControlTemplate x:Key="MonthCalendarViewControlTemplate" TargetType="calendar:CalendarView">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Border Visibility="{TemplateBinding HeaderVisibility}" BorderThickness="0 0 0 1" Background="{StaticResource CalendarView_SubHeaderBackground}" BorderBrush="{StaticResource HeaderBorder}">
        <ContentPresenter Grid.Row="0" HorizontalAlignment="Center" Margin="5" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" />
      </Border>
      <Grid Grid.Row="1" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
        <Grid.RowDefinitions>
          <RowDefinition Height="1*" />
          <RowDefinition Height="6*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="1*" />
          <ColumnDefinition Width="7*" />
        </Grid.ColumnDefinitions>
        <Rectangle Grid.ColumnSpan="2" VerticalAlignment="Bottom" Height="1" Margin="1 0" Fill="{StaticResource HeaderBorder}" Visibility="{Binding Path=HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" />
        <Rectangle Grid.RowSpan="2" Fill="{StaticResource WeekNumbersBackground}" Margin="1 1 0 1" Visibility="{Binding Path=HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" />
      </Grid>
      <ItemsPresenter Grid.Row="2" Margin="1 1 0 0" />
      <Rectangle Grid.Row="1" Width="241" Height="155" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="MonthCalendarViewStyle" TargetType="calendar:CalendarView">
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template" Value="{StaticResource MonthCalendarViewControlTemplate}" />
  </Style>
  <ControlTemplate x:Key="RadCalendarControlTemplate" TargetType="telerikInput:RadCalendar">
    <HeaderedContentControl Style="{StaticResource HeaderedContentControlStyle}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
      <HeaderedContentControl.Header>
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
          </Grid.ColumnDefinitions>
          <RepeatButton x:Name="MoveLeft" Style="{StaticResource RepeatButtonBackStyle}" Grid.Column="0" Margin="4" MinWidth="22" MinHeight="22" IsTabStop="False" />
          <Button x:Name="Header" Grid.Column="1" Style="{StaticResource CalendarHeaderButtonStyle}" Margin="0 4" IsTabStop="False" />
          <RepeatButton x:Name="MoveRight" Style="{StaticResource RepeatButtonNextStyle}" Grid.Column="2" Margin="4" MinWidth="22" MinHeight="22" IsTabStop="False" />
        </Grid>
      </HeaderedContentControl.Header>
      <HeaderedContentControl.Content>
        <calendar:TransitionPanel x:Name="TransitionPanel" Grid.Row="1" ClipToBounds="True">
          <primitives:RadUniformGrid x:Name="MonthViews" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" />
          <primitives:RadUniformGrid x:Name="YearViews" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
          <primitives:RadUniformGrid x:Name="DecadeViews" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
          <primitives:RadUniformGrid x:Name="CenturyViews" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
        </calendar:TransitionPanel>
      </HeaderedContentControl.Content>
    </HeaderedContentControl>
  </ControlTemplate>
  <Style x:Key="RadCalendarStyle" TargetType="telerikInput:RadCalendar">
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="Columns" Value="1" />
    <Setter Property="Rows" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource PickerForeground}" />
    <Setter Property="Background" Value="{StaticResource ControlBackground}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlBorder}" />
    <Setter Property="BorderThickness" Value="1 0 1 1" />
    <Setter Property="ViewsHeaderVisibility" Value="Collapsed" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="MonthViewStyle" Value="{StaticResource MonthCalendarViewStyle}" />
    <Setter Property="YearViewStyle" Value="{StaticResource CalendarViewStyle}" />
    <Setter Property="DecadeViewStyle" Value="{StaticResource CalendarViewStyle}" />
    <Setter Property="CenturyViewStyle" Value="{StaticResource CalendarViewStyle}" />
    <Setter Property="DayButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
    <Setter Property="MonthButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
    <Setter Property="YearButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
    <Setter Property="DecadeButtonStyle" Value="{StaticResource CalendarButtonStyle}" />
    <Setter Property="MonthViewPanel" Value="{StaticResource MonthViewItemsPanelTemplate}" />
    <Setter Property="YearViewPanel" Value="{StaticResource YearViewPanelTemplate}" />
    <Setter Property="DecadeViewPanel" Value="{StaticResource DecadeViewPanelTemplate}" />
    <Setter Property="CenturyViewPanel" Value="{StaticResource CenturyViewPanelTemplate}" />
    <Setter Property="Template" Value="{StaticResource RadCalendarControlTemplate}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  </Style>
  <Style TargetType="telerikInput:RadCalendar" BasedOn="{StaticResource RadCalendarStyle}" />
  <ControlTemplate x:Key="DateTimePickerDropDownButtonControlTemplate" TargetType="telerik:RadDropDownButton">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Fill)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource Icon_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Unfocused" />
          <VisualState x:Name="Focused" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="IsOpenedState">
          <VisualState x:Name="Closed" />
          <VisualState x:Name="Opened">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BackgroundChecked">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IconChecked">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Icon">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Indeterminate" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="DropDownButtonPosition">
          <VisualState x:Name="DropDownButtonAtLeft" />
          <VisualState x:Name="DropDownButtonAtTop" />
          <VisualState x:Name="DropDownButtonAtRight" />
          <VisualState x:Name="DropDownButtonAtBottom" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="PopupPlacementState">
          <VisualState x:Name="PlacementBottom" />
          <VisualState x:Name="PlacementTop" />
          <VisualState x:Name="PlacementLeft" />
          <VisualState x:Name="PlacementRight" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="Background" CornerRadius="3" SnapsToDevicePixels="True" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />
      <Border x:Name="BackgroundChecked" CornerRadius="3" SnapsToDevicePixels="True" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ButtonBorder_Pressed}" Background="{StaticResource ButtonBackground_Pressed}" Visibility="Collapsed" />
      <Path x:Name="Icon" Margin="4 0" Fill="{StaticResource Icon_Normal}" Width="8" Height="8" SnapsToDevicePixels="True" Data="M6,6 L8,6 L8,8 L6,8 z M3,6 L5,6 L5,8 L3,8 z M0,6 L2,6 L2,8 L0,8 z M6,3 L8,3 L8,5 L6,5 z M3,3 L5,3 L5,5 L3,5 z M0,3 L2,3 L2,5 L0,5 z M6,0 L8,0 L8,2 L6,2 z M3,0 L5,0 L5,2 L3,2 z M0,0 L2,0 L2,2 L0,2 z" />
      <Path x:Name="IconChecked" Margin="4 0" Visibility="Collapsed" Fill="{StaticResource Icon_Pressed}" Width="8" Height="8" SnapsToDevicePixels="True" Data="M6,6 L8,6 L8,8 L6,8 z M3,6 L5,6 L5,8 L3,8 z M0,6 L2,6 L2,8 L0,8 z M6,3 L8,3 L8,5 L6,5 z M3,3 L5,3 L5,5 L3,5 z M0,3 L2,3 L2,5 L0,5 z M6,0 L8,0 L8,2 L6,2 z M3,0 L5,0 L5,2 L3,2 z M0,0 L2,0 L2,2 L0,2 z" />
      <Popup x:Name="DropDownPopup" StaysOpen="False" Focusable="False" Placement="Bottom" IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
        <Border x:Name="DropDownPopupBorder" Margin="0 1 0 0" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}" MaxWidth="{TemplateBinding DropDownMaxWidth}" MaxHeight="{TemplateBinding DropDownMaxHeight}">
          <ContentPresenter x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" ContentTemplate="{TemplateBinding DropDownContentTemplate}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}" />
        </Border>
      </Popup>
    </Grid>
  </ControlTemplate>
  <Style x:Key="DateTimePickerDropDownButtonStyle" TargetType="telerik:RadDropDownButton">
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="IsTabStop" Value="True" />
    <Setter Property="Background" Value="{StaticResource ButtonBackground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ButtonBorder_Normal}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template" Value="{StaticResource DateTimePickerDropDownButtonControlTemplate}" />
  </Style>
  <ControlTemplate x:Key="DateTimePickerCloseButtonControlTemplate" TargetType="telerik:RadToggleButton">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Content" />
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Background)" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.BorderBrush)" Storyboard.TargetName="MouseOverVisual">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentControl.Foreground)" Storyboard.TargetName="Content">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonForeground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border x:Name="Background" CornerRadius="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
      <Border x:Name="MouseOverVisual" CornerRadius="1" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ButtonBorder_MouseOver}" Background="{StaticResource ButtonBackground_MouseOver}" />
      <ContentControl x:Name="Content" Foreground="{StaticResource ButtonForeground_Normal}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
    </Grid>
  </ControlTemplate>
  <Style x:Key="DateTimePickerCloseButtonStyle" TargetType="telerik:RadToggleButton">
    <Setter Property="Template" Value="{StaticResource DateTimePickerCloseButtonControlTemplate}" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Margin" Value="2" />
  </Style>
  <ControlTemplate x:Key="DateTimePickerControlTemplate" TargetType="telerikInput:RadDateTimePicker">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownOpenBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownOpenBorder" Storyboard.TargetProperty="BorderBrush">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver" />
          <VisualState x:Name="DropDownOpen">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Focus" />
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.BorderBrush)">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DropDownOpenBorder">
                <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="Focus">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Unfocused" />
        </VisualStateGroup>
        <VisualStateGroup x:Name="InputTypeStates">
          <VisualState x:Name="DateTimePicker">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="PART_Clock">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Thickness>-1,0,0,0</Thickness>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="DatePicker">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_Clock" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButtonContainer" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="TimePicker">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_Calendar" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButtonContainer" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid.ColumnDefinitions>
        <ColumnDefinition x:Name="TextColumn" Width="*" />
        <ColumnDefinition x:Name="ButtonsColumn" Width="Auto" />
      </Grid.ColumnDefinitions>
      <Border x:Name="Background" Grid.ColumnSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}" CornerRadius="3" />
      <Border x:Name="DropDownOpenBorder" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ButtonBorder_Pressed}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource PickerBackground}" CornerRadius="3" />
      <!--IsReadOnly="{TemplateBinding IsReadOnly}"-->
      <telerik:RadWatermarkTextBox x:Name="PART_DateTimeInput" Grid.Column="0" Text="{Binding DateTimeText, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" CurrentText="{Binding CurrentDateTimeText, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" VerticalAlignment="Stretch" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0" MinHeight="0" Foreground="{TemplateBinding Foreground}" WatermarkContent="{TemplateBinding DateTimeWatermarkContent}" WatermarkTemplate="{TemplateBinding DateTimeWatermarkTemplate}" TextAlignment="{TemplateBinding TextAlignment}" TabIndex="0" SelectionOnFocus="{TemplateBinding SelectionOnFocus}" />
      <telerik:RadDropDownButton x:Name="DP" Grid.Column="1" TabIndex="1" PopupPlacementTarget="{Binding ElementName=PART_DateTimeInput}" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" CloseOnEnter="True" IsTabStop="False" Style="{StaticResource DateTimePickerDropDownButtonStyle}">
        <telerik:RadDropDownButton.DropDownContent>
          <Grid Background="{StaticResource ControlBackground}">
            <Grid.RowDefinitions>
              <RowDefinition />
              <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <telerikInput:RadCalendar x:Name="PART_Calendar" Grid.Row="0" Grid.Column="0" IsReadOnly="{TemplateBinding IsReadOnly}" DateSelectionMode="{TemplateBinding DateSelectionMode}" Culture="{TemplateBinding Culture}" SelectionMode="Single" Style="{TemplateBinding CalendarStyle}" DisplayDateStart="{TemplateBinding DisplayDateStart}" DisplayDateEnd="{TemplateBinding DisplayDateEnd}" SelectableDateStart="{TemplateBinding SelectableDateStart}" SelectableDateEnd="{TemplateBinding SelectableDateEnd}" DisplayDate="{Binding DisplayDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
            <telerikInput:DateTimePickerClock x:Name="PART_Clock" Grid.Column="1" Grid.Row="0" ItemsSource="{TemplateBinding ClockItemsSource}" StartTime="{TemplateBinding StartTime}" EndTime="{TemplateBinding EndTime}" TimeInterval="{TemplateBinding TimeInterval}" IsReadOnly="{TemplateBinding IsReadOnly}" Style="{TemplateBinding ClockStyle}" Culture="{TemplateBinding Culture}" SelectedTime="{Binding SelectedTime, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
            <Border x:Name="CloseButtonContainer" Grid.ColumnSpan="2" Grid.Row="1" Margin="0 -1 0 0" BorderThickness="1" BorderBrush="{StaticResource ControlBorder}">
              <telerik:RadToggleButton x:Name="PART_Close" HorizontalAlignment="Right" Padding="8 3" IsThreeState="False" Content="Close" IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" Style="{StaticResource DateTimePickerCloseButtonStyle}" />
            </Border>
          </Grid>
        </telerik:RadDropDownButton.DropDownContent>
      </telerik:RadDropDownButton>
      <Border x:Name="Focus" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ButtonBorder_Focus}" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" />
      <Popup x:Name="PART_InputPopup" telerik:PopupExtensions.IsOpen="{Binding IsTooltipOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" telerik:PopupExtensions.Placement="Top" telerik:PopupExtensions.PlacementTarget="{Binding ElementName=PART_DateTimeInput}" telerik:PopupExtensions.Owner="{Binding RelativeSource={RelativeSource TemplatedParent}}">
        <ContentPresenter Content="{TemplateBinding TooltipContent}" ContentTemplate="{TemplateBinding TooltipTemplate}" />
      </Popup>
    </Grid>
  </ControlTemplate>
  <DataTemplate x:Key="TooltipTemplate">
    <Grid VerticalAlignment="Center" Background="White">
      <ContentPresenter Margin="2 0" Content="{Binding}" />
    </Grid>
  </DataTemplate>
  <Style x:Key="RadDateTimePickerStyle" TargetType="telerikInput:RadDateTimePicker">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Background" Value="{StaticResource PickerBackground}" />
    <Setter Property="Foreground" Value="{StaticResource PickerForeground}" />
    <Setter Property="BorderBrush" Value="{StaticResource PickerBorder_Normal}" />
    <Setter Property="Padding" Value="5 3" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="CalendarStyle" Value="{StaticResource RadCalendarStyle}" />
    <Setter Property="ClockStyle" Value="{StaticResource RadClockStyle}" />
    <Setter Property="DateTimeWatermarkTemplate" Value="{x:Null}" />
    <Setter Property="TooltipTemplate" Value="{StaticResource TooltipTemplate}" />
    <Setter Property="Template" Value="{StaticResource DateTimePickerControlTemplate}" />
  </Style>
  <Style TargetType="telerikInput:RadDateTimePicker" BasedOn="{StaticResource RadDateTimePickerStyle}" />
  <Style TargetType="telerikInput:RadDatePicker" BasedOn="{StaticResource RadDateTimePickerStyle}">
    <Setter Property="InputMode" Value="DatePicker" />
  </Style>
  <Style TargetType="telerikInput:RadTimePicker" BasedOn="{StaticResource RadDateTimePickerStyle}">
    <Setter Property="InputMode" Value="TimePicker" />
  </Style>
  <!-- RadRating -->
  <!-- *** RATING *** -->
  <Style TargetType="telerikInput:RadRating" x:Key="RadRatingStyle">
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="Background" Value="{StaticResource Rating_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource Rating_BorderBrush}" />
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="HorizontalAlignment" Value="Left" />
    <Setter Property="VerticalAlignment" Value="Top" />
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <StackPanel Orientation="Horizontal" />
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadRating">
          <Grid x:Name="Root">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver" />
                <VisualState x:Name="Pressed" />
                <VisualState x:Name="Disabled" />
                <VisualState x:Name="ReadOnly">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetName="ReadOnlyVisualElement" Storyboard.TargetProperty="Opacity" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused" />
                <VisualState x:Name="Focused">
                  <Storyboard Duration="0">
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <ItemsPresenter />
            </Border>
            <Border x:Name="ReadOnlyVisualElement" IsHitTestVisible="False" Opacity="0" Background="{StaticResource Rating_ReadOnlyBackground}" BorderBrush="{StaticResource Rating_ReadOnlyBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
            <Rectangle x:Name="FocusVisualElement" Stroke="{StaticResource FocusBrushBlack}" IsHitTestVisible="false" Visibility="Collapsed" StrokeDashArray="1 2" StrokeThickness="1" RadiusX="1" RadiusY="1" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadRating" BasedOn="{StaticResource RadRatingStyle}" />
  <!-- *** RATING ITEM *** -->
  <Style TargetType="telerikInput:RadRatingItem" x:Key="RadRatingItemStyle">
    <Setter Property="Background" Value="{StaticResource RatingItem_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource RatingItem_BorderBrush}" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalAlignment" Value="Top" />
    <Setter Property="Padding" Value="2" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadRatingItem">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="MouseOverRatingItem" Storyboard.TargetProperty="Opacity" />
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="SelectedRatingItem" Storyboard.TargetProperty="Opacity" />
                    <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetName="SelectedUnHoveredRatingItem" Storyboard.TargetProperty="Opacity" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="MouseOverRatingItem" Storyboard.TargetProperty="Opacity" />
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="SelectedUnHoveredRatingItem" Storyboard.TargetProperty="Opacity" />
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="SelectedRatingItem" Storyboard.TargetProperty="Opacity" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="DisabledRatingItem" Storyboard.TargetProperty="Opacity" />
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="DisabledRatingItemBackground" Storyboard.TargetProperty="Opacity" />
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="NormalRatingItem" Storyboard.TargetProperty="Opacity" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="ReadOnly" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FillStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="00:00:00.1000000" />
                </VisualStateGroup.Transitions>
                <VisualState x:Name="Empty" />
                <VisualState x:Name="Partial" />
                <VisualState x:Name="Filled" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Background="#00FFFFFF" BorderThickness="0" />
            <Grid Margin="{TemplateBinding Padding}">
              <Path x:Name="NormalRatingItem" Fill="{TemplateBinding Background}" Stretch="Uniform" HorizontalAlignment="Center" Stroke="{TemplateBinding BorderBrush}" StrokeLineJoin="Round" StrokeThickness="0.6" VerticalAlignment="Stretch" Opacity="1" Data="M74,40 L76.5,35 L79,40 L85,41 L80.5,44.5 L81.291664,50 L76.5,47.583332 L71.645836,50 L72.5,44.5 L68,41 z" />
              <telerikRating:LinearClipper RatioVisible="{TemplateBinding RatioVisible}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                <Path x:Name="SelectedRatingItem" Fill="{StaticResource RatingItem_SelectedBackground}" Stroke="{StaticResource RatingItem_SelectedBorder}" StrokeThickness="0.6" Stretch="Uniform" StrokeLineJoin="Round" Opacity="1" Data="M74,40 L76.5,35 L79,40 L85,41 L80.5,44.5 L81.291664,50 L76.5,47.583332 L71.645836,50 L72.5,44.5 L68,41 z" />
              </telerikRating:LinearClipper>
              <telerikRating:LinearClipper RatioVisible="{TemplateBinding RatioVisible}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                <Path x:Name="MouseOverRatingItem" Fill="{StaticResource RatingItem_MouseOverBackground}" Stretch="Uniform" Stroke="{StaticResource RatingItem_MouseOverBorder}" StrokeThickness="0.6" StrokeLineJoin="Round" VerticalAlignment="Stretch" Opacity="0" Data="M74,40 L76.5,35 L79,40 L85,41 L80.5,44.5 L81.291664,50 L76.5,47.583332 L71.645836,50 L72.5,44.5 L68,41 z" />
              </telerikRating:LinearClipper>
              <Path x:Name="DisabledRatingItemBackground" Stretch="Uniform" HorizontalAlignment="Center" Fill="{StaticResource ControlBackground_Disabled}" Opacity="0" Stroke="{StaticResource ControlOuterBorder_Disabled}" StrokeThickness="0.6" StrokeLineJoin="Round" VerticalAlignment="Stretch" Data="M74,40 L76.5,35 L79,40 L85,41 L80.5,44.5 L81.291664,50 L76.5,47.583332 L71.645836,50 L72.5,44.5 L68,41 z" />
              <telerikRating:LinearClipper x:Name="DisabledRatingItem" HorizontalContentAlignment="Center" RatioVisible="{TemplateBinding RatioVisible}" ExpandDirection="Right" Opacity="0">
                <Path Stretch="Uniform" Stroke="{x:Null}" StrokeLineJoin="Round" VerticalAlignment="Stretch" Opacity="1" Data="M74,40 L76.5,35 L79,40 L85,41 L80.5,44.5 L81.291664,50 L76.5,47.583332 L71.645836,50 L72.5,44.5 L68,41 z" Fill="{StaticResource RatingItem_SelectedDisabledBackground}" />
              </telerikRating:LinearClipper>
              <telerikRating:LinearClipper RatioVisible="{TemplateBinding ValueRatio}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                <Path x:Name="SelectedUnHoveredRatingItem" Stretch="Uniform" Stroke="{StaticResource RatingItem_SelectedUnHoveredBorder}" StrokeThickness="0.6" StrokeLineJoin="Round" VerticalAlignment="Stretch" Opacity="0" Data="M74,40 L76.5,35 L79,40 L85,41 L80.5,44.5 L81.291664,50 L76.5,47.583332 L71.645836,50 L72.5,44.5 L68,41 z" Fill="{StaticResource RatingItem_SelectedUnHoveredBackground}" />
              </telerikRating:LinearClipper>
            </Grid>
            <ContentPresenter x:Name="Content" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" ContentTemplate="{TemplateBinding ContentTemplate}" Grid.Row="1" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadRatingItem" BasedOn="{StaticResource RadRatingItemStyle}" />
  <!-- RadCalculator -->
  <Style x:Key="CalculatorHistoryDisplay_Style" TargetType="TextBox">
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="Padding" Value="2" />
    <Setter Property="IsEnabled" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="TextBox">
          <ScrollViewer BorderThickness="0" BorderBrush="Transparent" Background="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_ContentHost" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CalculatorDisplayValue_Style" TargetType="TextBox">
    <Setter Property="IsReadOnly" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="TextBox">
          <ContentPresenter Content="{TemplateBinding Text}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="HorizontalContentAlignment" Value="Right" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
  </Style>
  <ControlTemplate x:Key="RadCalculatorTemplate" TargetType="telerikInput:RadCalculator">
    <Border x:Name="Calculator" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="MemoryButtonsVisible" />
          <VisualState x:Name="MemoryButtonsCollapsed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Mc_Button">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Mr_Button">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Ms_Button">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Mplus_Button">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Mminus_Button">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="row">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <GridLength>0</GridLength>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Grid x:Name="Root" Margin="4">
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto" />
          <RowDefinition />
        </Grid.RowDefinitions>
        <Border BorderBrush="{StaticResource CalculatorResults_OuterBorder}" BorderThickness="1" Background="{StaticResource CalculatorResults_Background}" CornerRadius="3" Height="65">
          <Grid Margin="2">
            <Grid.RowDefinitions>
              <RowDefinition />
              <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="auto" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Border Grid.ColumnSpan="2" Grid.RowSpan="2" BorderBrush="{StaticResource CalculatorResults_InnerBorder}" BorderThickness="1" Background="{StaticResource CalculatorResults_InnerBackground}" CornerRadius="1" />
            <Border Background="{StaticResource CalculatorResults_TransparentBackground}" Grid.RowSpan="2" Grid.ColumnSpan="2" CornerRadius="2" Margin="3" Opacity="0.5" />
            <TextBox x:Name="DisplayTextBox" Margin="0,-6,5,5" Grid.Column="1" Grid.Row="1" Foreground="{TemplateBinding Foreground}" FontSize="24" HorizontalAlignment="Right" Style="{StaticResource CalculatorDisplayValue_Style}" TextAlignment="Right" VerticalAlignment="Bottom" Text="{Binding DisplayedValue, RelativeSource={RelativeSource TemplatedParent}}" />
            <TextBlock x:Name="MemoryIndicatorTextBox" Foreground="{TemplateBinding Foreground}" FontSize="12" Text="M" Margin="4,5,5,5" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsMemoryUpdated, Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Center" />
            <TextBox x:Name="HistoryTextBox" Foreground="{TemplateBinding Foreground}" FontSize="12" Grid.Column="1" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=History}" TextAlignment="Right" Style="{StaticResource CalculatorHistoryDisplay_Style}" Margin="4,5,5,0" />
          </Grid>
        </Border>
        <Grid Grid.Row="1" Margin="0,5,-3,0">
          <Grid.Resources>
            <Style TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
              <Setter Property="Focusable" Value="False" />
              <Setter Property="IsTabStop" Value="False" />
              <Setter Property="MinHeight" Value="25" />
              <Setter Property="MinWidth" Value="35" />
              <Setter Property="Margin" Value="0,6,4,0" />
            </Style>
          </Grid.Resources>
          <Grid.RowDefinitions>
            <RowDefinition x:Name="row" />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
          </Grid.ColumnDefinitions>
          <!--<Memory Function Buttons>-->
          <telerik:RadButton x:Name="Mc_Button" Content="MC" Grid.Column="0" Background="{StaticResource MemoryButton_Background}" Command="controls:RadCalculatorCommands.MemoryClear" />
          <telerik:RadButton x:Name="Mr_Button" Content="MR" Grid.Column="1" Background="{StaticResource MemoryButton_Background}" Command="controls:RadCalculatorCommands.MemoryRecall" />
          <telerik:RadButton x:Name="Ms_Button" Content="MS" Grid.Column="2" Background="{StaticResource MemoryButton_Background}" Command="controls:RadCalculatorCommands.MemoryStore" />
          <telerik:RadButton x:Name="Mplus_Button" Content="M+" Grid.Column="3" Background="{StaticResource MemoryButton_Background}" Command="controls:RadCalculatorCommands.MemoryPlus" />
          <telerik:RadButton x:Name="Mminus_Button" Content="M-" Grid.Column="4" Background="{StaticResource MemoryButton_Background}" Command="controls:RadCalculatorCommands.MemoryMinus" />
          <!--<Operation Buttons>-->
          <telerik:RadButton x:Name="Delete_Button" Grid.Row="1" Grid.Column="0" Content="←" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.Delete" />
          <telerik:RadButton x:Name="ClearInput_Button" Grid.Row="1" Grid.Column="1" Content="CE" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.ClearInput" />
          <telerik:RadButton x:Name="ClearEverything_Button" Grid.Row="1" Grid.Column="2" Content="C" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.ClearEverything" />
          <telerik:RadButton x:Name="Negate_Button" Grid.Row="1" Grid.Column="3" Content="±" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.ExecuteUnaryOperation" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Negate}" />
          <telerik:RadButton x:Name="SquareRoot_Button" Grid.Row="1" Grid.Column="4" Content="√" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.ExecuteUnaryOperation" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.SquareRoot}" />
          <telerik:RadButton x:Name="Divide_Button" Grid.Row="2" Grid.Column="3" Content="/" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.AddPendingBinaryOperation" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Divide}" />
          <telerik:RadButton x:Name="Percent_Button" Grid.Row="2" Grid.Column="4" Content="%" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.ExecutePercentOperation" />
          <telerik:RadButton x:Name="Multiply_Button" Grid.Row="3" Grid.Column="3" Content="*" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.AddPendingBinaryOperation" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Multiply}" />
          <telerik:RadButton x:Name="Reciprocal_Button" Grid.Row="3" Grid.Column="4" Content="1/x" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.ExecuteUnaryOperation" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Reciprocal}" />
          <telerik:RadButton x:Name="Substract_Button" Grid.Row="4" Command="controls:RadCalculatorCommands.AddPendingBinaryOperation" Grid.Column="3" Content="-" Background="{StaticResource OperatorsButton_Background}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Substract}" />
          <telerik:RadButton x:Name="Add_Button" Grid.Row="5" Grid.Column="3" Content="+" Background="{StaticResource OperatorsButton_Background}" Command="controls:RadCalculatorCommands.AddPendingBinaryOperation" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Add}" />
          <!--<Numeric Buttons>-->
          <telerik:RadButton x:Name="input7_Button" Grid.Row="2" Content="7" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="7" />
          <telerik:RadButton x:Name="input8_Button" Grid.Row="2" Grid.Column="1" Content="8" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="8" />
          <telerik:RadButton x:Name="input9_Button" Grid.Row="2" Grid.Column="2" Content="9" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="9" />
          <telerik:RadButton x:Name="input4_Button" Grid.Row="3" Content="4" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="4" />
          <telerik:RadButton x:Name="input5_Button" Grid.Row="3" Grid.Column="1" Content="5" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="5" />
          <telerik:RadButton x:Name="input6_Button" Grid.Row="3" Grid.Column="2" Content="6" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="6" />
          <telerik:RadButton x:Name="input1_Button" Grid.Row="4" Content="1" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="1" />
          <telerik:RadButton x:Name="input2_Button" Grid.Row="4" Grid.Column="1" Content="2" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="2" />
          <telerik:RadButton x:Name="input3_Button" Grid.Row="4" Grid.Column="2" Content="3" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="3" />
          <telerik:RadButton x:Name="FloatingPoint_Button" Grid.Row="5" Grid.Column="2" Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=DecimalSeparator}" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=DecimalSeparator}" />
          <telerik:RadButton x:Name="input0_Button" Grid.Row="5" Grid.ColumnSpan="2" MinHeight="25" MinWidth="75" Content="0" FontWeight="Bold" Command="controls:RadCalculatorCommands.UpdateInput" CommandParameter="0" />
          <telerik:RadButton x:Name="Equals_Button" Grid.Row="4" Grid.Column="4" Grid.RowSpan="2" MinWidth="35" Content="=" MinHeight="56" Command="controls:RadCalculatorCommands.ExecuteBinaryOperation" />
        </Grid>
      </Grid>
    </Border>
  </ControlTemplate>
  <Style x:Key="RadCalculatorStyle" TargetType="telerikInput:RadCalculator">
    <Setter Property="Template" Value="{StaticResource RadCalculatorTemplate}" />
    <Setter Property="Background" Value="{StaticResource Calculator_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource Calculator_BorderBrush}" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource Calculator_Foreground}" />
    <Setter Property="Width" Value="205" />
    <Setter Property="Height" Value="268" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="telerikInput:RadCalculator" BasedOn="{StaticResource RadCalculatorStyle}" />
  <!-- RadCalculatorPicker -->
  <calculator:DecimalDisplayValueConverter x:Key="DecimalDisplayValueConverter" />
  <Style x:Key="CalculatorPickerDisplayValue_Style" TargetType="TextBox">
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="IsEnabled" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="TextBox">
          <ScrollViewer BorderThickness="0" BorderBrush="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_ContentHost" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <ControlTemplate x:Key="RadCalculatorPickerTemplate" TargetType="telerikInput:RadCalculatorPicker">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition />
        <ColumnDefinition Width="auto" />
      </Grid.ColumnDefinitions>
      <Border x:Name="BackgroundVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" CornerRadius="1" />
      <TextBox x:Name="PART_CalculatorInput" Foreground="{TemplateBinding Foreground}" MinHeight="0" Padding="{TemplateBinding Padding}" Style="{StaticResource CalculatorPickerDisplayValue_Style}" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, Mode=TwoWay, Converter={StaticResource DecimalDisplayValueConverter}}" />
      <telerik:RadDropDownButton x:Name="PART_DropDownButton" CloseOnEnter="True" Grid.Column="1" DropDownIndicatorVisibility="Collapsed" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Padding="0" PopupPlacementTarget="{Binding ElementName=PART_CalculatorInput}" TabIndex="1" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" Focusable="False">
        <telerik:RadDropDownButton.DropDownContent>
          <Grid>
            <telerikInput:RadCalculator x:Name="PART_Calculator" Margin="0,1,0,0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=Value}" MemoryValue="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=MemoryValue}" ErrorMessage="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=ErrorMessage}" />
          </Grid>
        </telerik:RadDropDownButton.DropDownContent>
        <telerik:RadDropDownButton.Template>
          <ControlTemplate TargetType="telerik:RadDropDownButton">
            <Grid>
              <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="false" Placement="Bottom" IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                <ContentPresenter x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" ContentTemplate="{TemplateBinding DropDownContentTemplate}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}" />
              </Popup>
            </Grid>
          </ControlTemplate>
        </telerik:RadDropDownButton.Template>
        <Grid>
          <telerikChromes:ButtonChrome x:Name="ButtonChrome" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}" />
          <Grid x:Name="DropDownIcon" Margin="3" Height="10" Width="10">
            <Rectangle Fill="Black" />
            <Rectangle Fill="White" Margin="1" />
            <Rectangle Fill="#FFC52B2B" Margin="2,2,2,0" VerticalAlignment="Top" Height="2" />
            <Rectangle Fill="Black" HorizontalAlignment="Left" Margin="2,0,0,4" VerticalAlignment="Bottom" Width="1" Height="1" />
            <Rectangle Fill="Black" HorizontalAlignment="Left" Margin="4,0,0,4" VerticalAlignment="Bottom" Width="1" Height="1" />
            <Rectangle Fill="Black" HorizontalAlignment="Left" Margin="2,0,0,2" VerticalAlignment="Bottom" Width="1" Height="1" />
            <Rectangle Fill="Black" HorizontalAlignment="Left" Margin="4,0,0,2" VerticalAlignment="Bottom" Width="1" Height="1" />
            <Rectangle Fill="Black" HorizontalAlignment="Right" Margin="0,0,2,2" VerticalAlignment="Bottom" Width="2" Height="3" />
          </Grid>
        </Grid>
      </telerik:RadDropDownButton>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadCalculatorPickerStyle" TargetType="telerikInput:RadCalculatorPicker">
    <Setter Property="Template" Value="{StaticResource RadCalculatorPickerTemplate}" />
    <Setter Property="Background" Value="{StaticResource CalculatorPicker_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource CalculatorPicker_BorderBrush}" />
    <Setter Property="Foreground" Value="{StaticResource CalculatorPicker_Foreground}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="Padding" Value="4 2" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="telerikInput:RadCalculatorPicker" BasedOn="{StaticResource RadCalculatorPickerStyle}" />
  <!-- RadUpload -->
  <!-- RadMaskedInput -->
  <maskedInput:HorizontalContentAlignmentToTextAlignmentConverter x:Key="conv" />
  <telerik:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
  <Style x:Key="TextBoxStyle" TargetType="telerikMaskedInput:PreviewInputTextBox">
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="MinHeight" Value="20" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikMaskedInput:PreviewInputTextBox">
          <Grid x:Name="RootElement" Background="Transparent">
            <ScrollViewer Padding="{TemplateBinding Padding}" Background="Transparent" BorderThickness="0" Foreground="{TemplateBinding Foreground}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_ContentHost" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <ControlTemplate x:Key="ClearButtonTemplate" TargetType="telerik:RadButton">
    <Border x:Name="ButtonBorder" BorderBrush="White" BorderThickness="1" CornerRadius="15">
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="CommonStates">
          <VisualStateGroup.Transitions>
            <VisualTransition GeneratedDuration="0:0:0.2" />
          </VisualStateGroup.Transitions>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonBorder" Storyboard.TargetProperty="Background" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                      <GradientStop Color="#FF410404" Offset="1" />
                      <GradientStop Color="#FFE23737" />
                    </LinearGradientBrush>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Pressed">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonBorder" Storyboard.TargetProperty="Background" Duration="0">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                      <GradientStop Color="#FFE23737" Offset="1" />
                      <GradientStop Color="#FF410404" />
                    </LinearGradientBrush>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonBorder" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ControlBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonBorder" Storyboard.TargetProperty="BorderBrush">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ControlOuterBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Stroke">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ControlElement_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Focused" />
          <VisualState x:Name="Unfocused" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
          <GradientStop Color="#FF8F2121" Offset="1" />
          <GradientStop Color="#FFEB4545" />
        </LinearGradientBrush>
      </Border.Background>
      <Path x:Name="Path" Stretch="Fill" Stroke="White" Margin="4" RenderTransformOrigin="0.5,0.5" Data="M5,0.5 L6,0.5 6,5 10.5,5 10.5,6 6,6 6,10.5 5,10.5 5,6 0.5,6 0.5,5 5,5 z">
        <Path.RenderTransform>
          <RotateTransform Angle="-45" />
        </Path.RenderTransform>
      </Path>
    </Border>
  </ControlTemplate>
  <Style x:Key="ClearButtonStyle" TargetType="telerik:RadButton">
    <Setter Property="Template" Value="{StaticResource ClearButtonTemplate}" />
    <Setter Property="Width" Value="19" />
    <Setter Property="Height" Value="19" />
    <Setter Property="HorizontalAlignment" Value="Right" />
    <Setter Property="VerticalAlignment" Value="Center" />
    <Setter Property="Foreground" Value="White" />
    <Setter Property="Margin" Value="0,0,3,0" />
    <Setter Property="Cursor" Value="Hand" />
  </Style>
  <Style TargetType="telerikInput:RadMaskedInputBase" x:Key="RadMaskedInputBaseStyle">
    <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="Background" Value="{StaticResource TextBoxBackground}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="TextBoxStyle" Value="{StaticResource TextBoxStyle}" />
    <Setter Property="ClearButtonStyle" Value="{StaticResource ClearButtonStyle}" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="HorizontalAlignment" Value="Left" />
    <Setter Property="Padding" Value="3" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="IsReadOnly" Value="False" />
    <Setter Property="TextMode" Value="MaskedText" />
    <Setter Property="ErrorMessageTemplate">
      <Setter.Value>
        <DataTemplate>
          <TextBlock Text="{Binding}" Foreground="White" FontSize="12" />
        </DataTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadMaskedInputBase">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Opacity" To="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="ReadOnly">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridContainer" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxBackground_ReadOnly}" />
                    </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>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisplayText" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Opacity" To="1" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisplayTextContent" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Storyboard.TargetName="EditorSite" Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:00" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusedVisual">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="NotFocused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisplayTextContent" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Storyboard.TargetName="EditorSite" Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:00" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ContentStates">
                <VisualState x:Name="NotEmpty" />
                <VisualState x:Name="Empty">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="DisplayTextContent" Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:00" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EmptyContent" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="True">
              <Grid x:Name="GridContainer">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                  <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <maskedInput:PreviewInputTextBox x:Name="EditorSite" TabIndex="{TemplateBinding TabIndex}" Cursor="{TemplateBinding Cursor}" CaretBrush="#FFDDDDDD" IsTabStop="True" AcceptsReturn="True" IsEnabled="{TemplateBinding IsEnabled}" Foreground="{TemplateBinding Foreground}" IsReadOnly="{TemplateBinding IsReadOnly}" Padding="{TemplateBinding Padding}" Height="{TemplateBinding Height}" TextAlignment="{Binding HorizontalContentAlignment, Converter={StaticResource conv}, RelativeSource={RelativeSource Mode=TemplatedParent}}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{TemplateBinding TextBoxStyle}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" />
                <Border IsHitTestVisible="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" x:Name="DisplayTextContent" Visibility="Collapsed">
                  <maskedInput:PreviewInputTextBox x:Name="DisplayText" Cursor="{TemplateBinding Cursor}" CaretBrush="#FFDDDDDD" Text="{Binding Path=Text, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=OneWay}" IsTabStop="False" Padding="{TemplateBinding Padding}" IsEnabled="{TemplateBinding IsEnabled}" Foreground="{TemplateBinding Foreground}" IsReadOnly="{TemplateBinding IsReadOnly}" Style="{TemplateBinding TextBoxStyle}" Height="{TemplateBinding Height}" TextAlignment="{Binding HorizontalContentAlignment, Converter={StaticResource conv}, RelativeSource={RelativeSource Mode=TemplatedParent}}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" />
                </Border>
                <Border IsHitTestVisible="False" x:Name="EmptyContent" Visibility="Collapsed" Padding="5,0,0,0">
                  <ContentControl x:Name="Content" Content="{TemplateBinding EmptyContent}" ContentTemplate="{TemplateBinding EmptyContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{TemplateBinding Foreground}" Margin="{TemplateBinding Padding}" FontStyle="Italic" />
                </Border>
                <telerik:RadButton x:Name="ClearButton" IsEnabled="{TemplateBinding IsEnabled}" Command="{TemplateBinding ClearCommand}" IsTabStop="False" Style="{TemplateBinding ClearButtonStyle}" Opacity="0" Grid.Column="1" Visibility="{Binding Path=IsClearButtonVisible, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource boolToVisConverter}}"></telerik:RadButton>
              </Grid>
            </Border>
            <Border x:Name="FocusedVisual" Visibility="Collapsed" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" />
            <Border x:Name="DisabledVisual" Visibility="Collapsed" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Disabled}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadMaskedCurrencyInput" BasedOn="{StaticResource RadMaskedInputBaseStyle}" x:Key="RadMaskedCurrencyInputStyle">
    <Setter Property="InputBehavior" Value="Insert" />
    <Setter Property="Mask" Value="c9.2" />
    <Setter Property="HorizontalContentAlignment" Value="Right" />
    <Setter Property="AllowSkipPlaceholders" Value="false" />
    <Setter Property="AutoFillZeros" Value="false" />
    <Setter Property="SectionsNavigationMode" Value="None" />
  </Style>
  <Style TargetType="telerikInput:RadMaskedNumericInput" BasedOn="{StaticResource RadMaskedInputBaseStyle}" x:Key="RadMaskedNumericInputStyle">
    <Setter Property="InputBehavior" Value="Insert" />
    <Setter Property="Mask" Value="#9.2" />
    <Setter Property="HorizontalContentAlignment" Value="Right" />
    <Setter Property="AllowSkipPlaceholders" Value="false" />
    <Setter Property="AutoFillZeros" Value="false" />
    <Setter Property="SectionsNavigationMode" Value="None" />
  </Style>
  <Style TargetType="telerikInput:RadMaskedTextInput" BasedOn="{StaticResource RadMaskedInputBaseStyle}" x:Key="RadMaskedTextInputStyle">
    <Setter Property="Mask" Value="a20" />
    <Setter Property="SpinMode" Value="None" />
    <Setter Property="SelectionOnFocus" Value="CaretToBeginning" />
    <Setter Property="SectionsNavigationMode" Value="Once" />
  </Style>
  <Style TargetType="telerikInput:RadMaskedDateTimeInput" BasedOn="{StaticResource RadMaskedInputBaseStyle}" x:Key="RadMaskedDateTimeInputStyle">
    <Setter Property="Mask" Value="d" />
    <Setter Property="SpinMode" Value="Position" />
    <Setter Property="SectionsNavigationMode" Value="Once" />
  </Style>
  <Style TargetType="telerikInput:RadMaskedNumericInput" BasedOn="{StaticResource RadMaskedNumericInputStyle}" />
  <Style TargetType="telerikInput:RadMaskedCurrencyInput" BasedOn="{StaticResource RadMaskedCurrencyInputStyle}" />
  <Style TargetType="telerikInput:RadMaskedDateTimeInput" BasedOn="{StaticResource RadMaskedDateTimeInputStyle}" />
  <Style TargetType="telerikInput:RadMaskedTextInput" BasedOn="{StaticResource RadMaskedTextInputStyle}" />
</ResourceDictionary>