<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-->
  <SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FFB2B2B2" />
  <LinearGradientBrush x:Key="ControlBackground_Normal" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="White" />
    <GradientStop Color="#FFE3E8EB" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlForeground_Normal" Color="#FF000000" />
  <CornerRadius x:Key="ControlOuterBorder_CornerRadius">2</CornerRadius>
  <SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FF6F9DB5" />
  <LinearGradientBrush x:Key="ControlBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFD6E9F0" />
    <GradientStop Color="#FFA6C8D4" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlInnerBorder_MouseOver" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="ControlOuterBorder_Pressed" Color="#FF198FB0" />
  <LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF8AAEBB" Offset="0" />
    <GradientStop Color="#FFBBDBE6" Offset="0.15" />
    <GradientStop Color="#FF7FBFD4" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF65A5BB" Offset="0" />
    <GradientStop Color="#FFCCEDF8" Offset="0.143" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FFC9C9C9" />
  <SolidColorBrush x:Key="ControlInnerBorder_Disabled" Color="Transparent" />
  <LinearGradientBrush x:Key="ControlBackground_Disabled" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE3E8EB" Offset="1" />
    <GradientStop Color="White" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF00B1F0" />
  <SolidColorBrush x:Key="ControlBackground_Focused" Color="Transparent" />
  <SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="Transparent" />
  <SolidColorBrush x:Key="ControlOuterBorder_MouseOverChecked" Color="#FF198FB0" />
  <LinearGradientBrush x:Key="ControlBackground_MouseOverChecked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF80B7CA" Offset="0.027" />
    <GradientStop Color="#FFD0E4EC" Offset="0.146" />
    <GradientStop Color="#FF94C8D9" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlInnerBorder_MouseOverChecked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF77B0C4" Offset="0" />
    <GradientStop Color="#FFD6E9F0" Offset="0.143" />
    <GradientStop Color="#FFCCEDF8" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_Checked" Color="#FF198FB0" />
  <LinearGradientBrush x:Key="ControlBackground_Checked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF8AAEBB" Offset="0.027" />
    <GradientStop Color="#FFBBDBE6" Offset="0.146" />
    <GradientStop Color="#FF7FBFD4" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlInnerBorder_Checked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF65A5BB" Offset="0" />
    <GradientStop Color="#FFCCEDF8" Offset="0.143" />
    <GradientStop Color="#FFCCEDF8" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlElement_Active" Color="#FF000000" />
  <SolidColorBrush x:Key="ControlElement_Normal" Color="#FF000000" />
  <SolidColorBrush x:Key="ControlOuterBorder" Color="#FFB2B2B2" />
  <LinearGradientBrush EndPoint="0.5,1" x:Key="ControlBackground" StartPoint="0.5,0">
    <GradientStop Color="White" />
    <GradientStop Color="#FFE4E6E8" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_DisabledChecked" Color="#FF95C9DA" />
  <LinearGradientBrush x:Key="ControlBackground_DisabledChecked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE3F2F8" Offset="0.146" />
    <GradientStop Color="#FFC7DDE4" Offset="1" />
    <GradientStop Color="#FF9ED1E2" Offset="0.027" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ControlInnerBorder_DisabledChecked" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFA4D3E2" Offset="0" />
    <GradientStop Color="#FFE1F8FF" Offset="1" />
    <GradientStop Color="#FFCCEDF8" Offset="0.143" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlOuterBorder_Highlighted" Color="#72198FB0" />
  <LinearGradientBrush x:Key="ControlBackground_Highlighted" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE7F3F8" Offset="0" />
    <GradientStop Color="#FFD4E7EE" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ControlInnerBorder_Highlighted" Color="Transparent" />
  <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
  <SolidColorBrush x:Key="PickerForeground_Disabled" Color="#FF8D8D8D" />
  <SolidColorBrush x:Key="ButtonIconForeground_Disabled" Color="#FF353535" />
  <SolidColorBrush x:Key="ButtonIconBackground_Disabled" Color="Transparent" />
  <SolidColorBrush x:Key="ButtonIconForeground_MouseOver" Color="#FF353535" />
  <SolidColorBrush x:Key="ButtonIconBackground_MouseOver" Color="Transparent" />
  <SolidColorBrush x:Key="ButtonIconForeground_Pressed" Color="#FF353535" />
  <SolidColorBrush x:Key="ButtonIconBackground_Pressed" Color="Transparent" />
  <SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF" />
  <CornerRadius x:Key="SplitButton_LeftPartCornerRadius">2 0 0 2</CornerRadius>
  <CornerRadius x:Key="SplitButton_SpanCornerRadius">2</CornerRadius>
  <CornerRadius x:Key="SplitButton_SpanInnerCornerRadius">1</CornerRadius>
  <CornerRadius x:Key="SplitButton_RightPartCornerRadius">0 2 2 0</CornerRadius>
  <SolidColorBrush x:Key="ButtonIconForeground_Normal" Color="#FF353535" />
  <SolidColorBrush x:Key="ButtonIconBackground_Normal" Color="Transparent" />
  <ControlTemplate x:Key="ArrowTemplateEditableCombobox" TargetType="ContentControl">
    <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="7" Height="4" Fill="{TemplateBinding Foreground}" Margin="5 0 6 0" />
  </ControlTemplate>
  <SolidColorBrush x:Key="PickerPopupBackground" Color="White" />
  <ControlTemplate x:Key="ArrowTemplateNonEditableCombobox" TargetType="ContentControl">
    <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="7" Height="4" Fill="{TemplateBinding Foreground}" Margin="5 0 6 0" />
  </ControlTemplate>
  <SolidColorBrush x:Key="PickerForeground_Normal" Color="#FF000000" />
  <ControlTemplate x:Key="ArrowTemplate_Up" TargetType="ContentControl">
    <Grid>
      <Path x:Name="ForegroundIcon" Data="M0,1 L1,0 2,1 Z" Stretch="Fill" Width="7" Height="4" Fill="{TemplateBinding Foreground}" Margin="5 1 6 0" />
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="ArrowTemplate_Down" TargetType="ContentControl">
    <Grid>
      <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="7" Height="4" Fill="{TemplateBinding Foreground}" Margin="5 0 6 1" />
    </Grid>
  </ControlTemplate>
  <CornerRadius x:Key="SplitButton_TopPartCornerRadius">2 2 0 0</CornerRadius>
  <CornerRadius x:Key="SplitButton_BottomPartCornerRadius">0 0 2 2</CornerRadius>
  <CornerRadius x:Key="SplitButton_TopRightPartCornerRadius">0 2 0 0</CornerRadius>
  <CornerRadius x:Key="SplitButton_BottomRightPartCornerRadius">0 0 2 0</CornerRadius>
  <SolidColorBrush x:Key="ColorPicker_Foreground" Color="#FF000000" />
  <SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterColorStroke" Color="#FFFFC92B" />
  <SolidColorBrush x:Key="ColorPicker_HeaderButtonBackground" Color="#FFE4E4E4" />
  <SolidColorBrush x:Key="ColorPicker_HeaderButtonBorder" Color="#FFB2B2B2" />
  <CornerRadius x:Key="ColorPicker_HeaderButtonOuterBorder_CornerRadius">1</CornerRadius>
  <SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterBorder_MouseOver" Color="#FF6F9DB5" />
  <CornerRadius x:Key="ColorPicker_HeaderButtonInnerBorder_CornerRadius">0</CornerRadius>
  <SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerBorder_MouseOver" Color="#FFFFFFFF" />
  <LinearGradientBrush x:Key="ColorPicker_HeaderButtonInnerBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFD6E9F0" />
    <GradientStop Color="#FFA6C8D4" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerColorStroke" Color="#FFBEBEBE" />
  <CornerRadius x:Key="ColorPicker_ButtonOuterBorder_LeftCornerRadius">2,0,0,2</CornerRadius>
  <SolidColorBrush x:Key="ControlElement_MouseOver" Color="#FF000000" />
  <SolidColorBrush x:Key="ControlElement_Pressed" Color="#FF000000" />
  <CornerRadius x:Key="ColorPicker_ButtonOuterBorder_RightCornerRadius">0,2,2,0</CornerRadius>
  <SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_Selected" Color="#FF6F9DB5" />
  <SolidColorBrush x:Key="ColorPaletteViewItem_InnerBorder_Selected" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="ColorPaletteViewItem_Border" Color="#FFC9C9CB" />
  <SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_MouseOver" Color="#FF6F9DB5" />
  <SolidColorBrush x:Key="ColorPaletteViewItem_InnerBorder_MouseOver" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="ColorPicker_Background" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="ColorPicker_OuterBorder" Color="#FFB2B2B2" />
  <SolidColorBrush x:Key="ColorPicker_InnerBorder" Color="#FFF5F5F5" />
  <telerik:ColorToBrushConverter x:Key="converter" />
  <LinearGradientBrush x:Key="ColorPicker_TitleBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE4E4E4" Offset="0.033" />
    <GradientStop Color="#FFC5C5C5" Offset="0.914" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ColorPicker_TitleBorder" Color="#FFB2B2B2" />
  <LinearGradientBrush x:Key="ColorPicker_ButtonBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFD6E9F0" />
    <GradientStop Color="#FFA6C8D4" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="ColorPicker_ButtonBorder_MouseOver" Color="#FF6F9DB5" />
  <SolidColorBrush x:Key="ColorPicker_ButtonInnerBorder_MouseOver" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="SliderThumb_OuterBorder_Normal" Color="#FFB2B2B2" />
  <CornerRadius x:Key="ControlInnerBorder_CornerRadius">1</CornerRadius>
  <SolidColorBrush x:Key="ControlInnerBorder_Normal" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="SliderOuterBorder_Focused" Color="#FF198FB0" />
  <SolidColorBrush x:Key="TextBoxBackground" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="TextBoxBackground_ReadOnly" Color="#5EC9C9C9" />
  <SolidColorBrush x:Key="ControlForeground_Disabled" Color="#FF9D9D9D" />
  <Thickness x:Key="CalendarButtonButtonChromeMargin">0 0 1 1</Thickness>
  <Thickness x:Key="CalendarButtonTodayVisualMargin">0 0 1 1</Thickness>
  <SolidColorBrush x:Key="CalendarOuterBorder" Color="#FFB2B2B2" />
  <LinearGradientBrush x:Key="CalendarViewBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="White" Offset="0" />
    <GradientStop Color="#FFE3E5E7" Offset="1" />
  </LinearGradientBrush>
  <Thickness x:Key="CalendarViewBorderThickness">0 0 0 1</Thickness>
  <Thickness x:Key="CalendarViewHeaderPadding">1</Thickness>
  <Thickness x:Key="CalendarViewMargin">0 -1 0 1</Thickness>
  <Thickness x:Key="CalendarViewHeaderMargin">0 0 -1 0</Thickness>
  <SolidColorBrush x:Key="CalendarSubHeaderBackground" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="CalendarSubHeaderOuterBorder" Color="#FFFFFFFF" />
  <SolidColorBrush x:Key="CalendarSubHeaderInnerBorder" Color="#FFFFFFFF" />
  <Thickness x:Key="CalendarItemsMargin">1 1 1 1</Thickness>
  <sys:Int32 x:Key="CalendarWeekHeaderVerticalOuterBorderZIndex">0</sys:Int32>
  <SolidColorBrush x:Key="CalendarWeekHeaderVerticalOuterBorder" Color="Transparent" />
  <Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderThickness">0</Thickness>
  <Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderMargin">0</Thickness>
  <sys:Int32 x:Key="CalendarWeekHeaderHorizontalOuterBorderZIndex">0</sys:Int32>
  <SolidColorBrush x:Key="CalendarWeekHeaderHorizontalOuterBorder" Color="Transparent" />
  <Thickness x:Key="CalendarWeekHeaderHorizontalOuterBorderThickness">0</Thickness>
  <Thickness x:Key="CalendarWeekHeaderHorizontalOuterBorderMargin">0</Thickness>
  <sys:Int32 x:Key="CalendarWeekHeaderVerticalInnerBorderZIndex">0</sys:Int32>
  <SolidColorBrush x:Key="CalendarWeekHeaderVerticalInnerBorder" Color="Transparent" />
  <Thickness x:Key="CalendarWeekHeaderVerticalInnerBorderThickness">0</Thickness>
  <Thickness x:Key="CalendarWeekHeaderVerticalInnerBorderMargin">0</Thickness>
  <sys:Int32 x:Key="CalendarWeekHeaderHorizontalInnerBorderZIndex">0</sys:Int32>
  <SolidColorBrush x:Key="CalendarWeekHeaderHorizontalInnerBorder" Color="Transparent" />
  <Thickness x:Key="CalendarWeekHeaderHorizontalInnerBorderThickness">0</Thickness>
  <Thickness x:Key="CalendarWeekHeaderHorizontalInnerBorderMargin">0</Thickness>
  <sys:Int32 x:Key="CalendarWeekHeaderVerticalBackgroundZIndex">0</sys:Int32>
  <SolidColorBrush x:Key="CalendarWeekHeaderVerticalBackground" Color="#FFD4D4D4" />
  <Thickness x:Key="CalendarWeekHeaderVerticalBackgroundMargin">-1 0 0 0</Thickness>
  <sys:Int32 x:Key="CalendarWeekHeaderHorizontalBackgroundZIndex">0</sys:Int32>
  <LinearGradientBrush x:Key="CalendarWeekHeaderHorizontalBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFE4E4E4" Offset="0.033" />
    <GradientStop Color="#FFC5C5C5" Offset="0.914" />
    <GradientStop Color="#FF7A7A7A" Offset="1" />
    <GradientStop Color="#FFFAFAFA" Offset="0.956" />
    <GradientStop Color="#FFAFAFAF" Offset="0" />
  </LinearGradientBrush>
  <Thickness x:Key="CalendarWeekHeaderHorizontalBackgroundMargin">-1 0 0 0</Thickness>
  <SolidColorBrush x:Key="HeaderButtonOuterBorder_Normal" Color="Transparent" />
  <SolidColorBrush x:Key="HeaderButtonBackground_Normal" Color="Transparent" />
  <SolidColorBrush x:Key="HeaderButtonOuterBorder_MouseOver" Color="#66093655" />
  <SolidColorBrush x:Key="HeaderButtonInnerBorder_MouseOver" Color="#33FFFFFF" />
  <LinearGradientBrush x:Key="HeaderButtonBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF1D97B9" />
    <GradientStop Color="#FF127C9E" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="HeaderButtonOuterBorder_Pressed" Color="#8A093655" />
  <SolidColorBrush x:Key="HeaderButtonInnerBorder_Pressed" Color="#21FFFFFF" />
  <SolidColorBrush x:Key="HeaderButtonBackground_Pressed" Color="#FF0E7194" />
  <SolidColorBrush x:Key="HeaderButtonInnerBorder_Normal" Color="Transparent" />
  <SolidColorBrush x:Key="HeaderButtonIconBackground_Disabled" Color="Transparent" />
  <SolidColorBrush x:Key="HeaderButtonIconForeground_Disabled" Color="#88DBE9EE" />
  <SolidColorBrush x:Key="HeaderButtonIconBackground_MouseOver" Color="Transparent" />
  <SolidColorBrush x:Key="HeaderButtonIconForeground_MouseOver" Color="#FFDBE9EE" />
  <SolidColorBrush x:Key="HeaderButtonIconBackground_Pressed" Color="Transparent" />
  <SolidColorBrush x:Key="HeaderButtonIconForeground_Pressed" Color="#FFDBE9EE" />
  <SolidColorBrush x:Key="HeaderButtonIconBackground_Normal" Color="Transparent" />
  <SolidColorBrush x:Key="HeaderButtonIconForeground_Normal" Color="#FFDBE9EE" />
  <TextDecorationCollection x:Key="HeaderButtonTextDecoration">Underline</TextDecorationCollection>
  <FontWeight x:Key="HeaderTextFontWeight">Normal</FontWeight>
  <SolidColorBrush x:Key="HeaderTextBackground" Color="Transparent" />
  <SolidColorBrush x:Key="HeaderTextForeground" Color="#FFDBE9EE" />
  <SolidColorBrush x:Key="PanelBackground" Color="#FFFFFFFF" />
  <Thickness x:Key="CalendarHeaderPadding">1</Thickness>
  <Thickness x:Key="CalendarTransitionPanelMargin">0 1 0 -1</Thickness>
  <CornerRadius x:Key="CalendarOuterBorderCornerRadius">3</CornerRadius>
  <SolidColorBrush x:Key="CalendarInnerBorder" Color="White" />
  <CornerRadius x:Key="CalendarInnerBorderCornerRadius">2</CornerRadius>
  <Thickness x:Key="CalendarHeaderBorderThickness">1 1 1 0</Thickness>
  <CornerRadius x:Key="CalendarHeaderOuterCornerRadius">3 3 0 0</CornerRadius>
  <SolidColorBrush x:Key="HeaderOuterBorder" Color="#FFB2B2B2" />
  <LinearGradientBrush x:Key="HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF0E7094" />
    <GradientStop Color="#FF1990B1" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="HeaderInnerBorder" Color="#FFFFFFFF" />
  <CornerRadius x:Key="CalendarHeaderInnerCornerRadius">2 2 0 0</CornerRadius>
  <Thickness x:Key="ClockItemPadding">5 2 5 3</Thickness>
  <Thickness x:Key="ClockButtonChromeMargin">0 0 1 1</Thickness>
  <SolidColorBrush x:Key="PanelBorderBrush" Color="#FFB2B2B2" />
  <LinearGradientBrush x:Key="ClockBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="White" Offset="0" />
    <GradientStop Color="#FFE3E5E7" Offset="1" />
  </LinearGradientBrush>
  <CornerRadius x:Key="ClockOuterBorderCornerRadius">3</CornerRadius>
  <CornerRadius x:Key="ClockInnerBorderCornerRadius">2</CornerRadius>
  <SolidColorBrush x:Key="ClockInnerBorderBrush" Color="White" />
  <Thickness x:Key="ClockItemsMargin">2 1 1 1</Thickness>
  <LinearGradientBrush x:Key="TooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFFCFCFC" Offset="0" />
    <GradientStop Color="#FFD5D5D5" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="Tooltip_OuterBorderBrush" Color="#FFB2B2B2" />
  <Thickness x:Key="Tooltip_OuterBorderThickness">1</Thickness>
  <SolidColorBrush x:Key="TooltipInnerBorderBrush" Color="#63FFFFFF" />
  <SolidColorBrush x:Key="TooltipForeground" Color="#FF575757" />
  <ControlTemplate x:Key="CalendarIcon" TargetType="ContentControl">
    <Image Margin="3.1 3.1 2.9 2.9" Stretch="None" Source="/Telerik.Windows.Controls.Input;component/Themes/CalendarIcon-Blue.png" SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="NearestNeighbor" RenderOptions.EdgeMode="Aliased" />
  </ControlTemplate>
  <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="#FFFFFFFF" />
  <SolidColorBrush x:Key="RatingItem_BorderBrush" Color="#FF6F9DB5" />
  <LinearGradientBrush x:Key="RatingItem_SelectedBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF0E7094" Offset="1" />
    <GradientStop Color="#FF23A5C9" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RatingItem_SelectedBorder" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF0D5B76" Offset="1" />
    <GradientStop Color="#FF2BAFD4" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RatingItem_MouseOverBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF8ED9F4" />
    <GradientStop Color="#FF39BDEB" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="RatingItem_MouseOverBorder" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF0390C1" Offset="1" />
    <GradientStop Color="#FF2BAFD4" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="RatingItem_SelectedDisabledBackground" Color="#FFcbcaca" />
  <LinearGradientBrush x:Key="RatingItem_SelectedUnHoveredBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#99BCE5F4" />
    <GradientStop Color="#997DDCFE" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="CalculatorResults_OuterBorder" Color="#FF848484" />
  <LinearGradientBrush x:Key="CalculatorResults_Background" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="White" />
    <GradientStop Color="#FFD4D4D4" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="CalculatorResults_InnerBorder" Color="White" />
  <LinearGradientBrush x:Key="CalculatorResults_InnerBackground" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FF7FB5C9" />
    <GradientStop Color="#FF3F839B" Offset="1" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="CalculatorResults_TransparentBackground" EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
    <GradientStop Color="#26FFFFFF" Offset="1" />
    <GradientStop Color="#A2FFFFFF" Offset="0.008" />
    <GradientStop Color="Transparent" Offset="0.817" />
    <GradientStop Color="#41FFFFFF" Offset="0.108" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="MemoryButton_Background" Color="#FFCFDBE2" />
  <LinearGradientBrush x:Key="OperatorsButton_Background" EndPoint="0.5,1" StartPoint="0.5,0">
    <GradientStop Color="#FFCEDAE2" />
    <GradientStop Color="#FFF3F7F9" Offset="1" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="Calculator_Background" Color="#FFD5D7D7" />
  <SolidColorBrush x:Key="Calculator_BorderBrush" Color="#FFB2B2B2" />
  <SolidColorBrush x:Key="Calculator_Foreground" Color="White" />
  <SolidColorBrush x:Key="CalculatorPicker_Background" Color="White" />
  <SolidColorBrush x:Key="CalculatorPicker_BorderBrush" Color="#FFB2B2B2" />
  <SolidColorBrush x:Key="CalculatorPicker_Foreground" Color="Black" />
  <SolidColorBrush x:Key="ControlElement_Disabled" Color="#FF9D9D9D" />
  <!-- 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 Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0" />
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
              </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 Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                      <LinearDoubleKeyFrame KeyTime="00:00:00.150" Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{TemplateBinding CornerRadius}">
              <Grid>
                <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
                <Border x:Name="InnerBorder" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
              </Grid>
            </Border>
            <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
            <!-- Focus -->
            <Border x:Name="CommonStatesWrapper">
              <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Background="{StaticResource ControlBackground_Focused}">
                <Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}" />
              </Border>
            </Border>
          </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 Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0" />
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DisabledChecked">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </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="InnerCheckedVisual" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerCheckedVisual" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </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="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
              </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}">
              <Grid>
                <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
                <Border x:Name="InnerBorder" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
              </Grid>
            </Border>
            <!-- checked -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Checked}" CornerRadius="{TemplateBinding CornerRadius}">
              <Border x:Name="InnerCheckedVisual" Background="{StaticResource ControlBackground_Checked}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Checked}" />
            </Border>
            <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"></ContentPresenter>
            <!-- Focus -->
            <Border x:Name="CommonStatesWrapper">
              <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Background="{StaticResource ControlBackground_Focused}">
                <Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}" />
              </Border>
            </Border>
          </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 Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0" />
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="DisabledChecked">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
                  </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="InnerCheckedVisual" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerCheckedVisual" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </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="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
              </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}">
              <Grid>
                <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
                <Border x:Name="InnerBorder" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
              </Grid>
            </Border>
            <!-- checked -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Checked}" CornerRadius="{TemplateBinding CornerRadius}">
              <Border x:Name="InnerCheckedVisual" Background="{StaticResource ControlBackground_Checked}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Checked}" />
            </Border>
            <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
            <!-- Focus -->
            <Border x:Name="CommonStatesWrapper">
              <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Background="{StaticResource ControlBackground_Focused}">
                <Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}" />
              </Border>
            </Border>
          </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 Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0" />
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" />
                    <DoubleAnimation Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Opacity" To="0.5" />
                  </Storyboard>
                </VisualState>
              </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="IsOpenState">
                <VisualState x:Name="Closed" />
                <VisualState x:Name="Opened">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1" />
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_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="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}">
              <Grid>
                <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
                <Border x:Name="InnerBorder" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
              </Grid>
            </Border>
            <!-- checked -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Checked}" CornerRadius="{TemplateBinding CornerRadius}">
              <Border x:Name="InnerCheckedVisual" Background="{StaticResource ControlBackground_Checked}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Checked}" />
            </Border>
            <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>
              <ContentPresenter x:Name="Content" Grid.Row="1" Grid.Column="1" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" 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="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">
              <Border x:Name="FocusVisual" Visibility="Collapsed" Opacity="0" BorderThickness="1" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Background="{StaticResource ControlBackground_Focused}">
                <Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}" />
              </Border>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}" />
  <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="{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">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0:0: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="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0:0: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="InnerCheckedVisual" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_DisabledChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerCheckedVisual" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_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="InnerCheckedVisual" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOverChecked}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerCheckedVisual" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_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" />
                  </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}">
              <Grid>
                <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
                <Border x:Name="InnerBorder" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
              </Grid>
            </Border>
            <!-- checked -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Checked}" CornerRadius="{TemplateBinding CornerRadius}">
              <Border x:Name="InnerCheckedVisual" Background="{StaticResource ControlBackground_Checked}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Checked}" />
            </Border>
            <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="{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">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0:0: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="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <Thickness>0</Thickness>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderThickness">
                      <DiscreteObjectKeyFrame KeyTime="0:0: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}">
              <Grid>
                <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
                <Border x:Name="InnerBorder" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
              </Grid>
            </Border>
            <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" 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">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background" Duration="0">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_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>
                  </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}">
              <Grid>
                <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
                <Border x:Name="InnerBorder" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="Transparent" />
              </Grid>
            </Border>
            <!-- CheckedVisual -->
            <Border x:Name="CheckedVisual" Opacity="0" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_Highlighted}" CornerRadius="{TemplateBinding CornerRadius}">
              <Border Background="{StaticResource ControlBackground_Highlighted}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Highlighted}" />
            </Border>
            <!-- 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 x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}" />
              </Border>
            </Border>
            <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" CornerRadius="{TemplateBinding InnerCornerRadius}" MinHeight="7" Visibility="{TemplateBinding DropDownIndicatorVisibility}" IsBackgroundVisible="False" Style="{TemplateBinding TogglePartStyle}" IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
              <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="False" Content="{TemplateBinding Content}" CornerRadius="{TemplateBinding InnerCornerRadius}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
            </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>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerik:RadSplitButton" BasedOn="{StaticResource RadSplitButtonStyle}" />
  <!-- RadComboBox -->
  <!--EditableComboBox-->
  <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="Border" Storyboard.TargetProperty="BorderBrush">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                <LinearDoubleKeyFrame KeyTime="0:0:0.050" Value="0" />
              </DoubleAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.050">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>False</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_EditableTextBox" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource PickerForeground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal">
            <Storyboard>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                <LinearDoubleKeyFrame KeyTime="0:0:0.150" Value="0" />
              </DoubleAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderActive">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>True</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                <LinearDoubleKeyFrame KeyTime="0:0:0.115" Value="1" />
              </DoubleAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="DropDownOpen">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                <LinearDoubleKeyFrame KeyTime="0:0:0.050" Value="0" />
              </DoubleAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.050">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0" />
              </DoubleAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Focused">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderFocused">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>True</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                  <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.Column="0" IsHitTestVisible="False" Background="{StaticResource PickerBackground_Normal}" CornerRadius="{StaticResource SplitButton_LeftPartCornerRadius}" />
      <Border Grid.ColumnSpan="2" IsHitTestVisible="False" Background="{TemplateBinding Background}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />
      <Border x:Name="Border" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />
      <Border x:Name="MouseOverVisual" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ControlOuterBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" Visibility="Collapsed" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />
      <TextBox x:Name="PART_EditableTextBox" Grid.Column="0" BorderThickness="0" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" 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" Background="Transparent" BorderThickness="0" IsTabStop="False" VerticalScrollBarVisibility="Auto" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
            </Grid>
          </ControlTemplate>
        </TextBox.Template>
      </TextBox>
      <Border x:Name="FocusVisual" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ControlOuterBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}">
        <Border BorderBrush="{StaticResource ControlInnerBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" />
      </Border>
      <telerik:RadToggleButton x:Name="PART_DropDownButton" Margin="0" Padding="0" Grid.Column="1" IsTabStop="False" ClickMode="Press">
        <telerik:RadToggleButton.Template>
          <ControlTemplate TargetType="telerik:RadToggleButton">
            <ContentPresenter />
          </ControlTemplate>
        </telerik:RadToggleButton.Template>
        <Grid>
          <telerikChromes:ButtonChrome x:Name="ButtonChrome" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderPressed="{TemplateBinding IsDropDownOpen}" RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}" CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}" RenderEnabled="{TemplateBinding IsEnabled}" RenderActive="{TemplateBinding IsMouseOver}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" />
          <ContentControl x:Name="DropDownIcon" Grid.Column="1" IsTabStop="False" Foreground="{StaticResource ButtonIconForeground_Normal}" Background="{StaticResource ButtonIconBackground_Normal}" Template="{StaticResource ArrowTemplateEditableCombobox}" />
        </Grid>
      </telerik:RadToggleButton>
      <TextBlock x:Name="Watermark" Text="{TemplateBinding EmptyText}" Opacity=".5" IsHitTestVisible="False" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0" Visibility="Collapsed" />
      <Popup x:Name="PART_Popup">
        <Grid x:Name="PopupRoot">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" MinWidth="{TemplateBinding MinDropDownWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}" Background="{StaticResource PickerPopupBackground}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
              </Grid.RowDefinitions>
              <telerik:RadButton x:Name="PART_ClearButton" Grid.Row="0" Margin="-1 -1 -1 0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}" Content="{TemplateBinding ClearSelectionButtonContent}" />
              <ScrollViewer x:Name="PART_ScrollViewer" Grid.Row="1" Padding="0 1 0 0" BorderThickness="0" VerticalScrollBarVisibility="Auto" Foreground="{TemplateBinding Foreground}" CanContentScroll="True">
                <ItemsPresenter />
              </ScrollViewer>
            </Grid>
          </Border>
        </Grid>
      </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">
            <Storyboard>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.5" />
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.5" />
              </DoubleAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>False</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Normal" />
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderMouseOver">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>True</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="DropDownOpen">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Focused" />
          <VisualState x:Name="Unfocused" />
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border IsHitTestVisible="False" Background="{TemplateBinding Background}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />
      <telerik:RadToggleButton x:Name="PART_DropDownButton" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Margin="0" Padding="0" ClickMode="Press">
        <telerik:RadToggleButton.Template>
          <ControlTemplate TargetType="telerik:RadToggleButton">
            <ContentPresenter />
          </ControlTemplate>
        </telerik:RadToggleButton.Template>
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
          </Grid.ColumnDefinitions>
          <telerikChromes:ButtonChrome x:Name="ButtonChrome" Grid.ColumnSpan="2" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderPressed="{TemplateBinding IsDropDownOpen}" RenderFocused="{TemplateBinding IsFocused}" RenderEnabled="{TemplateBinding IsEnabled}" RenderMouseOver="{TemplateBinding IsMouseOver}" />
          <ContentControl x:Name="DropDownIcon" Grid.Column="1" IsTabStop="False" Foreground="{StaticResource ButtonIconForeground_Normal}" Background="{StaticResource ButtonIconBackground_Normal}" Template="{StaticResource ArrowTemplateNonEditableCombobox}" />
          <ContentPresenter x:Name="Content" Grid.Column="0" Margin="{TemplateBinding Padding}" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
        </Grid>
      </telerik:RadToggleButton>
      <Popup x:Name="PART_Popup">
        <Grid x:Name="PopupRoot">
          <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" MinWidth="{TemplateBinding MinDropDownWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}" Background="{StaticResource PickerPopupBackground}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
              </Grid.RowDefinitions>
              <telerik:RadButton x:Name="PART_ClearButton" Grid.Row="0" Margin="-1 -1 -1 0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}" Content="{TemplateBinding ClearSelectionButtonContent}" />
              <ScrollViewer x:Name="PART_ScrollViewer" Grid.Row="1" Foreground="{TemplateBinding Foreground}" Padding="0 1 0 0" BorderThickness="0" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
                <ItemsPresenter />
              </ScrollViewer>
            </Grid>
          </Border>
        </Grid>
      </Popup>
    </Grid>
  </ControlTemplate>
  <!--telerikInput:RadComboBoxItem-->
  <Style x:Key="RadComboBoxItemStyle" TargetType="telerikInput:RadComboBoxItem">
    <Setter Property="MinHeight" Value="19" />
    <Setter Property="Margin" Value="0 -1 0 0" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Padding" Value="3 2" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadComboBoxItem">
          <Border 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="HighlightVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                      <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.33" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Border x:Name="HighlightVisual" Visibility="Collapsed" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="1" BorderBrush="{StaticResource ControlOuterBorder_Highlighted}" Background="{StaticResource ControlBackground_Highlighted}">
                <Border BorderThickness="1" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Highlighted}" />
              </Border>
              <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadComboBoxItem" BasedOn="{StaticResource RadComboBoxItemStyle}" />
  <!--telerikInput:RadComboBox-->
  <Style x:Key="RadComboBoxStyle" TargetType="telerikInput:RadComboBox">
    <Setter Property="Template" Value="{StaticResource NonEditableComboBox}" />
    <Setter Property="EditableTemplate" Value="{StaticResource EditableComboBox}" />
    <Setter Property="NonEditableTemplate" Value="{StaticResource NonEditableComboBox}" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="Padding" Value="4 0" />
    <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  </Style>
  <Style TargetType="telerikInput:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle}" />
  <!-- RadNumericUpDown-->
  <Style x:Key="IncreaseButtonStyle" TargetType="RepeatButton">
    <Setter Property="Background" Value="{StaticResource ButtonIconBackground_Normal}" />
    <Setter Property="Foreground" Value="{StaticResource ButtonIconForeground_Normal}" />
    <Setter Property="MinWidth" Value="15" />
    <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>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <ContentPresenter />
            <ContentControl x:Name="Arrow" Template="{StaticResource ArrowTemplate_Up}" Foreground="{TemplateBinding Foreground}" Background="{TemplateBinding Background}" IsTabStop="False" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="DecreaseButtonStyle" TargetType="RepeatButton">
    <Setter Property="Background" Value="{StaticResource ButtonIconBackground_Normal}" />
    <Setter Property="Foreground" Value="{StaticResource ButtonIconForeground_Normal}" />
    <Setter Property="MinWidth" Value="15" />
    <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>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <ContentPresenter />
            <ContentControl x:Name="Arrow" Template="{StaticResource ArrowTemplate_Down}" Foreground="{TemplateBinding Foreground}" Background="{TemplateBinding Background}" IsTabStop="False" />
          </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="Normal">
            <Storyboard>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                <LinearDoubleKeyFrame KeyTime="0:0:0.150" Value="0" />
              </DoubleAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                <LinearDoubleKeyFrame KeyTime="0:0:0.115" Value="1" />
              </DoubleAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="increaseButtonChrome" Storyboard.TargetProperty="RenderActive">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>True</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decreaseButtonChrome" Storyboard.TargetProperty="RenderActive">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>True</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="MouseOverTextHidden">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textbox" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PickerForeground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Background">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decreaseButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>False</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="increaseButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>False</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="TextBoxBehavior">
          <VisualState x:Name="ShowTextBox">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textbox" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="colDefText" Storyboard.TargetProperty="(ColumnDefinition.Width)">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <GridLength>*</GridLength>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="colDefButtons" Storyboard.TargetProperty="(ColumnDefinition.Width)">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <GridLength>Auto</GridLength>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="increaseButtonChrome" Storyboard.TargetProperty="RenderFocused">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>False</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decreaseButtonChrome" Storyboard.TargetProperty="RenderFocused">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>False</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="HideTextBox">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textbox" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="colDefText" Storyboard.TargetProperty="(ColumnDefinition.Width)">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <GridLength>Auto</GridLength>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="colDefButtons" Storyboard.TargetProperty="(ColumnDefinition.Width)">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <GridLength>*</GridLength>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="increaseButtonChrome" Storyboard.TargetProperty="CornerRadius">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_TopPartCornerRadius}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decreaseButtonChrome" Storyboard.TargetProperty="CornerRadius">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_BottomPartCornerRadius}" />
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="increaseButtonChrome" Storyboard.TargetProperty="RenderActive">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>False</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decreaseButtonChrome" Storyboard.TargetProperty="RenderActive">
                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>False</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ButtonsBehavior">
          <VisualState x:Name="ShowButtons">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="increase" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decrease" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="HideButtons">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="increase" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decrease" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background" Storyboard.TargetProperty="CornerRadius">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_SpanCornerRadius}" />
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Focused">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.150">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="increaseButtonChrome" Storyboard.TargetProperty="RenderFocused">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>True</sys:Boolean>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decreaseButtonChrome" Storyboard.TargetProperty="RenderFocused">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <sys:Boolean>True</sys:Boolean>
                  </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="colDefText" Width="*" />
        <ColumnDefinition x:Name="colDefButtons" Width="Auto" />
      </Grid.ColumnDefinitions>
      <Border x:Name="Background" Grid.RowSpan="2" Grid.Column="0" Background="{StaticResource PickerBackground_Normal}" CornerRadius="{StaticResource SplitButton_LeftPartCornerRadius}" />
      <Border Grid.RowSpan="2" Grid.ColumnSpan="2" Background="{TemplateBinding Background}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />
      <Border x:Name="Border" Grid.RowSpan="2" Grid.ColumnSpan="2" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" />
      <Border x:Name="MouseOverVisual" Grid.RowSpan="2" Grid.ColumnSpan="2" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ControlOuterBorder_MouseOver}" IsHitTestVisible="False" Opacity="0" Visibility="Collapsed" />
      <TextBox x:Name="textbox" TabIndex="{TemplateBinding TabIndex}" Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" 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>
      <Border x:Name="FocusVisual" Visibility="Collapsed" Grid.RowSpan="2" Grid.ColumnSpan="2" BorderBrush="{StaticResource ControlOuterBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}">
        <Border BorderBrush="{StaticResource ControlInnerBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" />
      </Border>
      <RepeatButton x:Name="increase" Grid.Row="0" Grid.Column="1" Style="{StaticResource IncreaseButtonStyle}" IsTabStop="{TemplateBinding AreButtonsTabStops}">
        <telerikChromes:ButtonChrome x:Name="increaseButtonChrome" IsTabStop="False" CornerRadius="{StaticResource SplitButton_TopRightPartCornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" RenderFocused="{Binding IsFocused, ElementName=increase}" RenderMouseOver="{Binding IsMouseOver, ElementName=increase}" RenderPressed="{Binding IsPressed, ElementName=increase}" RenderEnabled="{Binding IsEnabled, ElementName=increase}" RenderActive="{TemplateBinding IsMouseOver}" />
      </RepeatButton>
      <RepeatButton x:Name="decrease" Grid.Row="1" Grid.Column="1" Style="{StaticResource DecreaseButtonStyle}" IsTabStop="{TemplateBinding AreButtonsTabStops}">
        <telerikChromes:ButtonChrome x:Name="decreaseButtonChrome" IsTabStop="False" CornerRadius="{StaticResource SplitButton_BottomRightPartCornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" RenderFocused="{Binding IsFocused, ElementName=decrease}" RenderMouseOver="{Binding IsMouseOver, ElementName=decrease}" RenderPressed="{Binding IsPressed, ElementName=decrease}" RenderEnabled="{Binding IsEnabled, ElementName=decrease}" RenderActive="{TemplateBinding IsMouseOver}" />
      </RepeatButton>
    </Grid>
  </ControlTemplate>
  <Style x:Key="RadNumericUpDownStyle" TargetType="telerikInput:RadNumericUpDown">
    <Setter Property="Template" Value="{StaticResource RadNumericUpDownTemplate}" />
    <Setter Property="MinHeight" Value="22" />
    <Setter Property="MinWidth" Value="60" />
    <Setter Property="Padding" Value="4 0" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="HorizontalContentAlignment" Value="Right" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="IsTabStop" Value="false" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>
  <Style TargetType="telerikInput:RadNumericUpDown" BasedOn="{StaticResource RadNumericUpDownStyle}" />
  <!-- RadColorPicker -->
  <Style TargetType="Button" x:Key="RadColorPicker_HeaderButtonStyle">
    <Setter Property="Foreground" Value="{StaticResource ColorPicker_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>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="border_mouseover" Storyboard.TargetProperty="Opacity" To="1" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="border_mouseover" Storyboard.TargetProperty="Opacity" To="1" />
                  </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_HeaderButtonBackground}" BorderBrush="{StaticResource ColorPicker_HeaderButtonBorder}" BorderThickness="0 0 1 0" />
            <!-- MouseOver -->
            <Border BorderThickness="1" Grid.ColumnSpan="2" Opacity="0" CornerRadius="{StaticResource ColorPicker_HeaderButtonOuterBorder_CornerRadius}" x:Name="border_mouseover" BorderBrush="{StaticResource ColorPicker_HeaderButtonOuterBorder_MouseOver}">
              <Border BorderThickness="1" CornerRadius="{StaticResource ColorPicker_HeaderButtonInnerBorder_CornerRadius}" BorderBrush="{StaticResource ColorPicker_HeaderButtonInnerBorder_MouseOver}" Background="{StaticResource ColorPicker_HeaderButtonInnerBackground_MouseOver}" />
            </Border>
            <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>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_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}">
              <Border x:Name="InnerBorder" BorderThickness="1" BorderBrush="{StaticResource ControlInnerBorder_Highlighted}" />
            </Border>
            <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>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_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="InnerBorder" BorderThickness="1" BorderBrush="{StaticResource ControlInnerBorder_Highlighted}" />
            </Border>
            <Border x:Name="BackgroundChecked" BorderThickness="1" Height="25" Width="11" Visibility="Collapsed" CornerRadius="{StaticResource ColorPicker_ButtonOuterBorder_RightCornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Pressed}" Background="{StaticResource ControlBackground_Pressed}">
              <Border BorderThickness="1" BorderBrush="{StaticResource ControlInnerBorder_Pressed}" />
            </Border>
            <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="BorderBrush" Storyboard.TargetName="Innerborder">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ColorPaletteViewItem_InnerBorder_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">
              <Border BorderThickness="1" x:Name="Innerborder" BorderBrush="{StaticResource ColorPaletteViewItem_InnerBorder_MouseOver}" />
            </Border>
          </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 ColorPicker_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}" />
    <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 ColorPicker_Background}" />
    <Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}" />
    <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}">
            <Border BorderBrush="{StaticResource ColorPicker_InnerBorder}" BorderThickness="1" CornerRadius="1">
              <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>
          </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="1" Background="{StaticResource ColorPicker_ButtonBackground_MouseOver}" BorderBrush="{StaticResource ColorPicker_ButtonBorder_MouseOver}" BorderThickness="1" Width="34" Grid.ColumnSpan="2">
                  <Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource ColorPicker_ButtonInnerBorder_MouseOver}" />
                </Border>
                <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 ColorPicker_Background}" />
      <Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="FontStyle" Value="Normal" />
      <Setter Property="FontWeight" Value="Bold" />
      <Setter Property="Foreground" Value="{StaticResource ColorPicker_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="BorderBrush" Value="{StaticResource SliderThumb_OuterBorder_Normal}" />
    <Setter Property="Background" Value="{StaticResource  ControlBackground_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="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_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="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_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="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_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="InnerBorder" BorderThickness="1" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Normal}" />
            </Border>
            <Border x:Name="FocusVisual" BorderBrush="{StaticResource SliderOuterBorder_Focused}" Visibility="Collapsed" BorderThickness="1" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--ColorEditor-->
  <Style x:Key="PadStyle" 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 BasedOn="{StaticResource PadStyle}" TargetType="pad:Pad" />
  <Style x:Key="RadColorEditorStyle" TargetType="telerikInput:RadColorEditor">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
    <Setter Property="Padding" Value="12" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadColorEditor">
          <Border x:Name="LayoutRoot" Background="{TemplateBinding Background}" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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="12" 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 x:Key="RadMaskedTextBoxStyle" TargetType="telerikInput:RadMaskedTextBox">
    <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 TextBoxBackground_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}" 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 -->
  <!-- Calendar and DatePicker -->
  <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverterInstance" />
  <!-- CalendarButtonStyle -->
  <Style x:Key="CalendarButtonStyle" TargetType="calendar:CalendarButton">
    <Setter Property="Padding" Value="0" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="calendar:CalendarButton">
          <Grid x:Name="LayoutRoot" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity">
                      <DiscreteDoubleKeyFrame KeyTime="0" Value="0.5" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="ViewStates">
                <VisualState x:Name="IsInAnotherView" />
                <VisualState x:Name="IsNotFromCurrentView">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                      <DiscreteDoubleKeyFrame KeyTime="0" Value="0.5" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ButtonType">
                <VisualState x:Name="Year" />
                <VisualState x:Name="Decade" />
                <VisualState x:Name="Date" />
                <VisualState x:Name="WeekName">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionChrome" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="WeekNumber">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionChrome" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="TodayDate">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TodayVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <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" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" />
            <telerikChromes:ButtonChrome x:Name="SelectionChrome" Margin="{StaticResource CalendarButtonButtonChromeMargin}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" RenderNormal="False" RenderFocused="{TemplateBinding IsFocused}" RenderSelected="{TemplateBinding IsSelected}" RenderHighlighted="{TemplateBinding IsMouseOver}" />
            <Border x:Name="TodayVisual" Margin="{StaticResource CalendarButtonTodayVisualMargin}" Visibility="Collapsed" BorderThickness="1" CornerRadius="2" BorderBrush="{StaticResource ControlOuterBorder_Pressed}" />
            <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!-- calendar:CalendarButton -->
  <Style TargetType="calendar:CalendarButton" BasedOn="{StaticResource CalendarButtonStyle}" />
  <!--CalendarViewStyle-->
  <Style TargetType="calendar:CalendarView" x:Key="CalendarViewStyle">
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="BorderBrush" Value="{StaticResource CalendarOuterBorder}" />
    <Setter Property="Background" Value="{StaticResource CalendarViewBackground}" />
    <Setter Property="BorderThickness" Value="{StaticResource CalendarViewBorderThickness}" />
    <Setter Property="Padding" Value="{StaticResource CalendarViewHeaderPadding}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="calendar:CalendarView">
          <Grid Margin="{StaticResource CalendarViewMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Border x:Name="BackgroundVisual" Grid.RowSpan="2" Background="{TemplateBinding Background}" />
            <Border x:Name="Header" Visibility="{TemplateBinding HeaderVisibility}" Margin="{StaticResource CalendarViewHeaderMargin}" Background="{StaticResource CalendarSubHeaderBackground}" BorderBrush="{StaticResource CalendarSubHeaderOuterBorder}" BorderThickness="{TemplateBinding BorderThickness}">
              <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource CalendarSubHeaderInnerBorder}">
                <ContentPresenter Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              </Border>
            </Border>
            <ItemsPresenter Grid.Row="1" Margin="{StaticResource CalendarItemsMargin}" />
            <Border x:Name="BorderBrush" Grid.RowSpan="2" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" />
            <Rectangle x:Name="MinDesiredSize" Grid.Row="1" Width="240" Height="155" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Margin" Value="0" />
  </Style>
  <!--MonthViewStyle-->
  <Style x:Key="MonthViewStyle" TargetType="calendar:CalendarView">
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="BorderBrush" Value="{StaticResource CalendarOuterBorder}" />
    <Setter Property="Background" Value="{StaticResource CalendarViewBackground}" />
    <Setter Property="BorderThickness" Value="{StaticResource CalendarViewBorderThickness}" />
    <Setter Property="Padding" Value="{StaticResource CalendarViewHeaderPadding}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="calendar:CalendarView">
          <Grid Margin="{StaticResource CalendarViewMargin}">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Border x:Name="BackgroundVisual" Grid.RowSpan="2" Background="{TemplateBinding Background}" />
            <Border x:Name="Header" Visibility="{TemplateBinding HeaderVisibility}" Margin="{StaticResource CalendarViewHeaderMargin}" Background="{StaticResource CalendarSubHeaderBackground}" BorderBrush="{StaticResource CalendarSubHeaderOuterBorder}" BorderThickness="{TemplateBinding BorderThickness}">
              <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource CalendarSubHeaderInnerBorder}">
                <ContentPresenter Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              </Border>
            </Border>
            <Grid x:Name="WeekHeaders" Grid.Row="1" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="6*" />
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="7*" />
              </Grid.ColumnDefinitions>
              <Border x:Name="VerticalOuterBorder" Grid.RowSpan="2" Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalOuterBorderZIndex}" BorderBrush="{StaticResource CalendarWeekHeaderVerticalOuterBorder}" BorderThickness="{StaticResource CalendarWeekHeaderVerticalOuterBorderThickness}" Margin="{StaticResource CalendarWeekHeaderVerticalOuterBorderMargin}" Visibility="{Binding Path=HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
              <Border x:Name="HorizontalOuterBorder" Grid.ColumnSpan="2" Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalOuterBorderZIndex}" BorderBrush="{StaticResource CalendarWeekHeaderHorizontalOuterBorder}" BorderThickness="{StaticResource CalendarWeekHeaderHorizontalOuterBorderThickness}" Margin="{StaticResource CalendarWeekHeaderHorizontalOuterBorderMargin}" Visibility="{Binding Path=HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
              <Border x:Name="VerticalInnerBorder" Grid.RowSpan="2" Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalInnerBorderZIndex}" BorderBrush="{StaticResource CalendarWeekHeaderVerticalInnerBorder}" BorderThickness="{StaticResource CalendarWeekHeaderVerticalInnerBorderThickness}" Margin="{StaticResource CalendarWeekHeaderVerticalInnerBorderMargin}" Visibility="{Binding Path=HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
              <Border x:Name="HorizontalInnerBorder" Grid.ColumnSpan="2" Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalInnerBorderZIndex}" BorderBrush="{StaticResource CalendarWeekHeaderHorizontalInnerBorder}" BorderThickness="{StaticResource CalendarWeekHeaderHorizontalInnerBorderThickness}" Margin="{StaticResource CalendarWeekHeaderHorizontalInnerBorderMargin}" Visibility="{Binding Path=HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
              <Rectangle x:Name="VerticalBackground" Grid.RowSpan="2" Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalBackgroundZIndex}" Fill="{StaticResource CalendarWeekHeaderVerticalBackground}" Margin="{StaticResource CalendarWeekHeaderVerticalBackgroundMargin}" Visibility="{Binding Path=HideColumn, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
              <Rectangle x:Name="HorizontalBackground" Grid.ColumnSpan="2" Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalBackgroundZIndex}" Fill="{StaticResource CalendarWeekHeaderHorizontalBackground}" Margin="{StaticResource CalendarWeekHeaderHorizontalBackgroundMargin}" Visibility="{Binding Path=HideRow, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}" />
            </Grid>
            <ItemsPresenter Grid.Row="1" Margin="{StaticResource CalendarItemsMargin}" />
            <Border x:Name="BorderBrush" Grid.RowSpan="2" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" />
            <Rectangle x:Name="MinDesiredSize" Grid.Row="1" Width="240" Height="155" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Margin" Value="0" />
  </Style>
  <!--calendar:CalendarView-->
  <Style TargetType="calendar:CalendarView" BasedOn="{StaticResource MonthViewStyle}" />
  <!-- HeaderButtonChrome -->
  <Style x:Key="HeaderButtonChrome" TargetType="telerikChromes:ButtonChrome">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="{StaticResource HeaderButtonOuterBorder_Normal}" />
    <Setter Property="Background" Value="{StaticResource HeaderButtonBackground_Normal}" />
    <Setter Property="CornerRadius" Value="{StaticResource SplitButton_SpanCornerRadius}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikChromes:ButtonChrome">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonOuterBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonInnerBorder_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonOuterBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonInnerBorder_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
              <Border x:Name="InnerBorder" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource HeaderButtonInnerBorder_Normal}" />
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--MoveLeftButtonStyle-->
  <Style x:Key="MoveLeftButtonStyle" TargetType="RepeatButton">
    <Setter Property="Width" Value="22" />
    <Setter Property="Height" Value="22" />
    <Setter Property="Margin" Value="3" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Grid Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <telerikChromes:ButtonChrome Style="{StaticResource HeaderButtonChrome}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" />
            <Path x:Name="BackgroundIcon" Fill="{StaticResource HeaderButtonIconBackground_Normal}" Margin="0 2 0 0" Width="4" Height="7" Data="M4,0 L4,7 3,7 3,6 2,6 2,5 1,5 1,4 0,4 0,3 1,3 1,2 2,2 2,1 3,1 3,0 z" />
            <Path x:Name="ForegroundIcon" Fill="{StaticResource HeaderButtonIconForeground_Normal}" Margin="0 1 0 1" Width="4" Height="7" Data="M4,0 L4,7 3,7 3,6 2,6 2,5 1,5 1,4 0,4 0,3 1,3 1,2 2,2 2,1 3,1 3,0 z" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--MoveRightButtonStyle-->
  <Style x:Key="MoveRightButtonStyle" TargetType="RepeatButton">
    <Setter Property="Width" Value="22" />
    <Setter Property="Height" Value="22" />
    <Setter Property="Margin" Value="3" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Grid Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconBackground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundIcon" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonIconForeground_Pressed}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <telerikChromes:ButtonChrome Style="{StaticResource HeaderButtonChrome}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RenderFocused="{TemplateBinding IsFocused}" />
            <Path x:Name="BackgroundIcon" Fill="{StaticResource HeaderButtonIconBackground_Normal}" Margin="0 2 0 0" Width="4" Height="7" Data="M0,0 L0,7 1,7 1,6 2,6 2,5 3,5 3,4 4,4 4,3 3,3 3,2 2,2 2,1 1,1 1,0 z" />
            <Path x:Name="ForegroundIcon" Fill="{StaticResource HeaderButtonIconForeground_Normal}" Margin="0 1 0 1" Width="4" Height="7" Data="M0,0 L0,7 1,7 1,6 2,6 2,5 3,5 3,4 4,4 4,3 3,3 3,2 2,2 2,1 1,1 1,0 z" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--CalendarHeaderButton-->
  <Style x:Key="CalendarHeaderButton" TargetType="Button">
    <Setter Property="Height" Value="22" />
    <Setter Property="Margin" Value="3" />
    <Setter Property="Cursor" Value="Hand" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid x:Name="LayoutRoot">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity">
                      <DiscreteDoubleKeyFrame KeyTime="0" Value="0.75" />
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundText" Storyboard.TargetProperty="TextDecorations">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonTextDecoration}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundText" Storyboard.TargetProperty="TextDecorations">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonTextDecoration}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundText" Storyboard.TargetProperty="TextDecorations">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonTextDecoration}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundText" Storyboard.TargetProperty="TextDecorations">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonTextDecoration}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ForegroundText" Storyboard.TargetProperty="TextDecorations">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonTextDecoration}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundText" Storyboard.TargetProperty="TextDecorations">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HeaderButtonTextDecoration}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock x:Name="BackgroundText" Text="{TemplateBinding Content}" Margin="0 2 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="{StaticResource HeaderTextFontWeight}" Foreground="{StaticResource HeaderTextBackground}" />
            <TextBlock x:Name="ForegroundText" Text="{TemplateBinding Content}" Margin="0 1 0 1" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="{StaticResource HeaderTextFontWeight}" Foreground="{StaticResource HeaderTextForeground}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--telerikInput:RadCalendar-->
  <Style x:Key="RadCalendarStyle" TargetType="telerikInput:RadCalendar">
    <Setter Property="Columns" Value="1" />
    <Setter Property="Rows" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
    <Setter Property="MonthViewStyle" Value="{StaticResource MonthViewStyle}" />
    <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="Background" Value="{StaticResource PanelBackground}" />
    <Setter Property="BorderBrush" Value="{StaticResource CalendarOuterBorder}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Padding" Value="{StaticResource CalendarHeaderPadding}" />
    <Setter Property="ViewsHeaderVisibility" Value="Collapsed" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadCalendar">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Border x:Name="Background" Grid.RowSpan="2" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
            <calendar:TransitionPanel x:Name="TransitionPanel" Grid.Row="1" ClipToBounds="True" Margin="{StaticResource CalendarTransitionPanelMargin}">
              <primitives:RadUniformGrid x:Name="MonthViews" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" />
              <primitives:RadUniformGrid x:Name="YearViews" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
              <primitives:RadUniformGrid x:Name="DecadeViews" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
              <primitives:RadUniformGrid x:Name="CenturyViews" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed" />
            </calendar:TransitionPanel>
            <Border x:Name="OuterBorder" Grid.RowSpan="2" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource CalendarOuterBorderCornerRadius}" BorderBrush="{TemplateBinding BorderBrush}">
              <Border x:Name="InnerBorder" BorderBrush="{StaticResource CalendarInnerBorder}" CornerRadius="{StaticResource CalendarInnerBorderCornerRadius}" BorderThickness="1" />
            </Border>
            <Border x:Name="Navigation" Margin="0 0 0 -1" Canvas.ZIndex="2" Visibility="{TemplateBinding HeaderVisibility}" BorderThickness="{StaticResource CalendarHeaderBorderThickness}" CornerRadius="{StaticResource CalendarHeaderOuterCornerRadius}" BorderBrush="{StaticResource HeaderOuterBorder}" Background="{StaticResource HeaderBackground}">
              <Border BorderThickness="{StaticResource CalendarHeaderBorderThickness}" BorderBrush="{StaticResource HeaderInnerBorder}" CornerRadius="{StaticResource CalendarHeaderInnerCornerRadius}" Padding="{TemplateBinding Padding}">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                  </Grid.ColumnDefinitions>
                  <RepeatButton x:Name="MoveLeft" Grid.Column="0" Style="{StaticResource MoveLeftButtonStyle}" />
                  <Button x:Name="Header" Grid.Column="1" Style="{StaticResource CalendarHeaderButton}" />
                  <RepeatButton x:Name="MoveRight" Grid.Column="2" Style="{StaticResource MoveRightButtonStyle}" />
                </Grid>
              </Border>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="MonthViewPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" FirstColumn="1" VerticalAlignment="Stretch" Rows="7" Columns="8" />
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="YearViewPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4" />
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="DecadeViewPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4" />
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="CenturyViewPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4" />
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadCalendar" BasedOn="{StaticResource RadCalendarStyle}" />
  <!-- Clock and TimePicker -->
  <Style TargetType="telerikInput:RadClockItem" x:Key="ClockItemStyle">
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="{StaticResource ClockItemPadding}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadClockItem">
          <Grid x:Name="LayoutRoot" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused" />
                <VisualState x:Name="Focused" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="MouseOver" />
                <VisualState x:Name="Normal" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Unselected" />
                <VisualState x:Name="Selected" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <telerikChromes:ButtonChrome x:Name="SelectionChrome" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" Margin="{StaticResource ClockButtonChromeMargin}" RenderNormal="False" RenderSelected="{TemplateBinding IsSelected}" RenderHighlighted="{TemplateBinding IsMouseOver}" />
            <ContentPresenter x:Name="Content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadClockItem" BasedOn="{StaticResource ClockItemStyle}" />
  <!--telerikInput:RadClock-->
  <Style TargetType="telerikInput:RadClock" x:Key="RadClockStyle">
    <!--<Setter Property="telerik:LocalizationManager.ResourceKey" Value="Clock" />-->
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="BorderBrush" Value="{StaticResource PanelBorderBrush}" />
    <Setter Property="Background" Value="{StaticResource ClockBackground}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Padding" Value="{StaticResource CalendarHeaderPadding}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="StartTime" Value="0:0:0" />
    <Setter Property="EndTime" Value="23:59:0" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="ItemsPanel">
      <Setter.Value>
        <ItemsPanelTemplate>
          <primitives:RadUniformGrid x:Name="uniformGrid" Columns="4" />
        </ItemsPanelTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="ItemTemplate">
      <Setter.Value>
        <DataTemplate>
          <TextBlock x:Name="ContentText" Text="{Binding}" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" />
        </DataTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadClock">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Border x:Name="BackgroundVisual" Grid.RowSpan="2" Background="{TemplateBinding Background}" CornerRadius="{StaticResource ClockOuterBorderCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
              <Border CornerRadius="{StaticResource ClockInnerBorderCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource ClockInnerBorderBrush}" />
            </Border>
            <Border x:Name="Header" BorderThickness="{StaticResource CalendarHeaderBorderThickness}" CornerRadius="{StaticResource CalendarHeaderOuterCornerRadius}" BorderBrush="{StaticResource HeaderOuterBorder}" Background="{StaticResource HeaderBackground}" MinHeight="32">
              <Border BorderThickness="{StaticResource CalendarHeaderBorderThickness}" BorderBrush="{StaticResource HeaderInnerBorder}" CornerRadius="{StaticResource CalendarHeaderInnerCornerRadius}" Padding="{TemplateBinding Padding}">
                <ContentControl Foreground="{StaticResource HeaderTextForeground}" IsTabStop="False" FontWeight="{StaticResource HeaderTextFontWeight}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              </Border>
            </Border>
            <ItemsPresenter Grid.Row="1" Margin="{StaticResource ClockItemsMargin}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadClock" BasedOn="{StaticResource RadClockStyle}" />
  <DataTemplate x:Key="WatermarkTemplate">
    <TextBlock Opacity="0.5" Text="{Binding}" />
  </DataTemplate>
  <DataTemplate x:Key="TooltipTemplate">
    <Border CornerRadius="2" Background="{StaticResource TooltipBackground}" BorderBrush="{StaticResource Tooltip_OuterBorderBrush}" BorderThickness="{StaticResource Tooltip_OuterBorderThickness}" Margin="0 2">
      <Border CornerRadius="1" BorderBrush="{StaticResource TooltipInnerBorderBrush}" BorderThickness="{StaticResource Tooltip_OuterBorderThickness}">
        <ContentControl Foreground="{StaticResource TooltipForeground}" Margin="5 2" Content="{Binding}" />
      </Border>
    </Border>
  </DataTemplate>
  <Style x:Key="CloseButtonStyle" TargetType="telerik:RadToggleButton">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerik:RadToggleButton">
          <Grid>
            <telerikChromes:ButtonChrome RenderNormal="False" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" />
            <ContentPresenter Margin="{TemplateBinding Padding}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="telerikInput:RadDateTimePicker" x:Key="RadDateTimePickerStyle">
    <Setter Property="CalendarStyle" Value="{StaticResource RadCalendarStyle}" />
    <Setter Property="ClockStyle" Value="{StaticResource RadClockStyle}" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="KeyboardNavigation.TabNavigation" Value="Once" />
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
    <Setter Property="TooltipTemplate" Value="{StaticResource TooltipTemplate}" />
    <Setter Property="Background" Value="{StaticResource PickerBackground_Normal}" />
    <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
    <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="FontStyle" Value="Normal" />
    <Setter Property="FontWeight" Value="Normal" />
    <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="DateTimeWatermarkTemplate" Value="{StaticResource WatermarkTemplate}" />
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="telerikInput:RadDateTimePicker">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                      <LinearDoubleKeyFrame KeyTime="00:00:00.150" Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Boolean>True</sys:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                      <LinearDoubleKeyFrame KeyTime="0:0:0.115" Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderActive">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Boolean>True</sys:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Boolean>True</sys:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundVisual" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                      <LinearDoubleKeyFrame KeyTime="0:0:0.050" Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0.050">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DateTimeInput" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource PickerForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Boolean>False</sys:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderFocused">
                      <DiscreteObjectKeyFrame KeyTime="0:0:0">
                        <DiscreteObjectKeyFrame.Value>
                          <sys:Boolean>True</sys:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00.115">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="InputTypeStates">
                <VisualState x:Name="DateTimePicker" />
                <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 />
              <ColumnDefinition Width="auto" />
            </Grid.ColumnDefinitions>
            <Border x:Name="BackgroundVisual" Grid.ColumnSpan="2" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />
            <Border x:Name="MouseOverVisual" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ControlOuterBorder_MouseOver}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" Visibility="Collapsed" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" />
            <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}" IsReadOnly="{TemplateBinding IsReadOnly}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Stretch" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0" MinHeight="0" Margin="{TemplateBinding BorderThickness}" WatermarkContent="{TemplateBinding DateTimeWatermarkContent}" WatermarkTemplate="{TemplateBinding DateTimeWatermarkTemplate}" TextAlignment="{TemplateBinding TextAlignment}" TabIndex="0" SelectionOnFocus="{TemplateBinding SelectionOnFocus}" />
            <Border x:Name="FocusVisual" Visibility="Collapsed" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{StaticResource ControlOuterBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}">
              <Border BorderBrush="{StaticResource ControlInnerBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" />
            </Border>
            <telerik:RadDropDownButton Grid.Column="1" TabIndex="1" Margin="-1 0 0 0" Padding="0" DropDownIndicatorVisibility="Collapsed" x:Name="PART_DropDownButton" PopupPlacementTarget="{Binding ElementName=PART_DateTimeInput}" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" CloseOnEnter="True" IsTabStop="False" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" telerikInput:DateTimePickerExtensions.FocusContentOnOpen="True" Focusable="False">
              <telerik:RadDropDownButton.DropDownContent>
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
                  <telerikInput:RadCalendar x:Name="PART_Calendar" Grid.Column="0" Grid.Row="0" IsReadOnly="{TemplateBinding IsReadOnly}" DateSelectionMode="{TemplateBinding DateSelectionMode}" Culture="{TemplateBinding Culture}" SelectionMode="Single" Style="{TemplateBinding CalendarStyle}" DisplayDateStart="{Binding DisplayDateStart, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" DisplayDate="{Binding DisplayDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DisplayDateEnd="{Binding DisplayDateEnd, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" SelectableDateStart="{Binding SelectableDateStart, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" SelectableDateEnd="{Binding SelectableDateEnd, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
                  <telerikInput:DateTimePickerClock x:Name="PART_Clock" Grid.Column="1" Grid.Row="0" ItemsSource="{TemplateBinding ClockItemsSource}" StartTime="{TemplateBinding StartTime}" EndTime="{TemplateBinding EndTime}" TimeInterval="{Binding TimeInterval, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" 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" Background="{StaticResource PanelBackground}" BorderThickness="1 0 1 1" BorderBrush="{StaticResource CalendarOuterBorder}">
                    <Border BorderThickness="1 0 1 1" BorderBrush="{StaticResource CalendarInnerBorder}">
                      <telerik:RadToggleButton x:Name="PART_Close" IsBackgroundVisible="False" HorizontalAlignment="Right" Padding="8 3" Margin="2" IsThreeState="False" telerik:LocalizationManager.ResourceKey="Close" Style="{StaticResource CloseButtonStyle}" IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
                    </Border>
                  </Border>
                </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}" RenderMouseOver="{Binding IsMouseOver, ElementName=PART_DropDownButton}" CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}" RenderEnabled="{TemplateBinding IsEnabled}" RenderActive="{TemplateBinding IsMouseOver}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" />
                <ContentControl x:Name="DropDownIcon" IsTabStop="False" Template="{StaticResource CalendarIcon}" Background="{StaticResource ButtonIconBackground_Normal}" Foreground="{StaticResource ButtonIconForeground_Normal}" />
              </Grid>
            </telerik:RadDropDownButton>
            <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}}" StaysOpen="False" AllowsTransparency="True">
              <ContentPresenter Content="{TemplateBinding TooltipContent}" ContentTemplate="{TemplateBinding TooltipTemplate}" />
            </Popup>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--telerikInput:RadDateTimePicker-->
  <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 x:Key="RadRatingStyle" TargetType="telerikInput:RadRating">
    <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 x:Key="RadRatingItemStyle" TargetType="telerikInput:RadRatingItem">
    <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}" ExpandDirection="Right" HorizontalContentAlignment="Center">
                <Path x:Name="SelectedUnHoveredRatingItem" Stretch="Uniform" Stroke="{StaticResource RatingItem_SelectedBorder}" 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>
  <ControlTemplate x:Key="TextBoxErrorTemplate">
    <StackPanel Orientation="Horizontal">
      <StackPanel Orientation="Horizontal">
        <AdornedElementPlaceholder x:Name="Holder" />
      </StackPanel>
      <Label Foreground="Red" Content="{Binding ElementName=Holder,                 Path=AdornedElement.DisplayErrorMessage}" />
    </StackPanel>
  </ControlTemplate>
  <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="Validation.ErrorTemplate" Value="{StaticResource TextBoxErrorTemplate}" />
    <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="EditorSite"
												Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Disabled}" />
                                        </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>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusedVisual">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <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>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditorSite" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <SolidColorBrush Color="Transparent" />
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </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="0" />
                    <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}" 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}" 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}" Foreground="{TemplateBinding Foreground}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 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>