<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="c"
        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: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:colorPaletteConverters="clr-namespace:Telerik.Windows.Controls.ColorPicker.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"
        xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls">
    <telerik1:ColorToBrushConverter x:Key="converter"/>
    <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <SolidColorBrush x:Key="FocusBrushBlack" Color="#FF000000"/>
    <SolidColorBrush x:Key="SliderThumb_OuterBorder_Normal" Color="#FF848484"/>
    <LinearGradientBrush x:Key="SliderOuterBorder_Focused" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF282828"/>
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ColorPicker_TitleBackground" Color="#FFDEDEDE"/>
    <SolidColorBrush x:Key="ColorPicker_TitleBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="ColorPicker_Background" Color="Transparent"/>
    <SolidColorBrush x:Key="ColorPicker_OuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="ColorPicker_InnerBorder" Color="#FFF5F5F5"/>
    <SolidColorBrush x:Key="ColorPicker_Foreground" Color="#FF000000"/>
    <SolidColorBrush x:Key="ColorPaletteViewItem_Border" Color="#FFC9C9CB"/>
    <SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_MouseOver" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_Selected" Color="#FF5D5D5D"/>
    <LinearGradientBrush x:Key="ColorPaletteViewItem_InnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <CornerRadius x:Key="ColorPicker_HeaderButtonOuterBorder_CornerRadius">1</CornerRadius>
    <CornerRadius x:Key="ColorPicker_HeaderButtonInnerBorder_CornerRadius">0</CornerRadius>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonBackground" Color="#FFDEDEDE"/>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterBorder_MouseOver" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerBorder_MouseOver" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ColorPicker_HeaderButtonInnerBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterColorStroke" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerColorStroke" Color="#FFBFBFBF"/>
    <LinearGradientBrush x:Key="TooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF" Offset="0"/>
        <GradientStop Color="#FFDEDEDE" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="Tooltip_OuterBorderBrush" Color="#FF848484"/>
    <Thickness x:Key="Tooltip_OuterBorderThickness">1</Thickness>
    <SolidColorBrush x:Key="TooltipForeground" Color="#FF000000"/>
    <CornerRadius x:Key="SplitButton_LeftPartCornerRadius">1 0 0 1</CornerRadius>
    <CornerRadius x:Key="SplitButton_RightPartCornerRadius">0 1 1 0</CornerRadius>
    <CornerRadius x:Key="SplitButton_TopPartCornerRadius">1 1 0 0</CornerRadius>
    <CornerRadius x:Key="SplitButton_BottomPartCornerRadius">0 0 1 1</CornerRadius>
    <CornerRadius x:Key="SplitButton_SpanCornerRadius">1</CornerRadius>
    <CornerRadius x:Key="SplitButton_SpanInnerCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="SplitButton_TopRightPartCornerRadius">0 1 0 0</CornerRadius>
    <CornerRadius x:Key="SplitButton_BottomRightPartCornerRadius">0 0 1 0</CornerRadius>
    <SolidColorBrush x:Key="TextBoxBackground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="TextBoxBackground_ReadOnly" Color="#5EC9C9C9"/>
    <CornerRadius x:Key="ControlOuterBorder_CornerRadius">1</CornerRadius>
    <CornerRadius x:Key="ControlInnerBorder_CornerRadius">0</CornerRadius>
    <SolidColorBrush x:Key="ControlOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="ControlBackground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ControlElement_Disabled" Color="#FF8D8D8D"/>
    <SolidColorBrush x:Key="ControlForeground_Disabled" Color="#FF8D8D8D"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FF989898"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Disabled" Color="Transparent"/>
    <SolidColorBrush x:Key="ControlBackground_Disabled" Color="#FFE0E0E0"/>
    <sys:Double x:Key="ControlElement_Height">3</sys:Double>
    <sys:Double x:Key="ControlElement_Width">5</sys:Double>
    <SolidColorBrush x:Key="ControlElement_Normal" Color="#FF000000"/>
    <SolidColorBrush x:Key="ControlElement_InnerNormal" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ControlForeground_Normal" Color="#FF000000"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF848484"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Normal" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ControlBackground_Normal" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF" Offset="0"/>
        <GradientStop Color="#FFDCDCDC" Offset="0.50"/>
        <GradientStop Color="#FFADADAD" Offset="0.50"/>
        <GradientStop Color="#FFD4D4D4" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_MouseOver" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ControlBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.50"/>
        <GradientStop Color="#FFFFD25A" Offset="0.50"/>
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ControlOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF282828"/>
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ControlInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFDCAB" Offset="0"/>
        <GradientStop Color="#FFFFD18F" Offset="0.5"/>
        <GradientStop Color="#FFFE9227" Offset="0.5"/>
        <GradientStop Color="#FFFFBA74" Offset="0"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_Highlighted" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Highlighted" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ControlBackground_Highlighted" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_Checked" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Checked" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ControlBackground_Checked" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFDCAB" Offset="0"/>
        <GradientStop Color="#FFFFD18F" Offset="0.5"/>
        <GradientStop Color="#FFFE9227" Offset="0.5"/>
        <GradientStop Color="#FFFFD74E" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ControlOuterBorder_MouseOverChecked" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF282828"/>
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ControlInnerBorder_MouseOverChecked" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.169"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ControlBackground_MouseOverChecked" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFE8AB" Offset="0"/>
        <GradientStop Color="#FFFFE08F" Offset="0.5"/>
        <GradientStop Color="#FFFEAF27" Offset="0.5"/>
        <GradientStop Color="#FFFFE74E" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="Transparent"/>
    <SolidColorBrush x:Key="ControlBackground_Focused" Color="Transparent"/>
    <SolidColorBrush x:Key="ButtonIconForeground_Disabled" Color="#FF8D8D8D"/>
    <SolidColorBrush x:Key="ButtonIconForeground_Normal" Color="#FF000000"/>
    <SolidColorBrush x:Key="ButtonIconForeground_MouseOver" Color="#FF000000"/>
    <SolidColorBrush x:Key="ButtonIconForeground_Pressed" Color="#FF000000"/>
    <SolidColorBrush x:Key="ButtonIconBackground_Disabled" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ButtonIconBackground_Normal" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ButtonIconBackground_MouseOver" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ButtonIconBackground_Pressed" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="PickerForeground_Normal" Color="#FF000000"/>
    <SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="PickerPopupBackground" Color="#FFFFFFFF"/>
    <CornerRadius x:Key="ValidationTooltipCornerRadius">1</CornerRadius>
    <CornerRadius x:Key="ValidationTooltip_CornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="ValidationTooltipForeground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ValidationTooltipOuterBorder" Color="#FFDC000C"/>
    <SolidColorBrush x:Key="ValidationTooltipInnerBorder" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="ValidationTooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFF424C" Offset="1"/>
        <GradientStop Color="#FFC92931"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ValidationInnerTick" Color="#FFCB576E"/>
    <SolidColorBrush x:Key="ValidationOuterTick" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="HeaderOuterBorder" Color="#FF000000"/>
    <SolidColorBrush x:Key="HeaderInnerBorder" Color="#FFB5B5B5"/>
    <LinearGradientBrush x:Key="HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF5B5B5B" Offset="1"/>
        <GradientStop Color="#FF868686"/>
        <GradientStop Color="#FF4F4F4F" Offset="0.42"/>
        <GradientStop Color="#FF0E0E0E" Offset="0.43"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="HeaderTextForeground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="HeaderTextBackground" Color="#FF000000"/>
    <FontWeight x:Key="HeaderTextFontWeight">Bold</FontWeight>
    <SolidColorBrush x:Key="HeaderButtonIconForeground_Disabled" Color="#88FFFFFF"/>
    <SolidColorBrush x:Key="HeaderButtonIconForeground_Normal" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="HeaderButtonIconForeground_MouseOver" Color="#FF000000"/>
    <SolidColorBrush x:Key="HeaderButtonIconForeground_Pressed" Color="#FF000000"/>
    <SolidColorBrush x:Key="HeaderButtonIconBackground_Disabled" Color="#88000000"/>
    <SolidColorBrush x:Key="HeaderButtonIconBackground_Normal" Color="#FF000000"/>
    <SolidColorBrush x:Key="HeaderButtonIconBackground_MouseOver" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="HeaderButtonIconBackground_Pressed" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="HeaderButtonOuterBorder_Normal" Color="#FF848484"/>
    <SolidColorBrush x:Key="HeaderButtonInnerBorder_Normal" Color="Transparent"/>
    <SolidColorBrush x:Key="HeaderButtonBackground_Normal" Color="Transparent"/>
    <SolidColorBrush x:Key="HeaderButtonOuterBorder_MouseOver" Color="#FFFFC92B"/>
    <SolidColorBrush x:Key="HeaderButtonInnerBorder_MouseOver" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="HeaderButtonBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFFBA3" Offset="1"/>
        <GradientStop Color="#FFFFFBDA" Offset="0"/>
        <GradientStop Color="#FFFFD25A" Offset="0.43"/>
        <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="HeaderButtonOuterBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF5F5F5F" Offset="1"/>
        <GradientStop Color="#FF282828"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="HeaderButtonInnerBorder_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB69A78"/>
        <GradientStop Color="#FFFFE17A" Offset="0.126"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="HeaderButtonBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
        <GradientStop Color="#FFFE9227" Offset="0.57"/>
        <GradientStop Color="#FFFFD18F" Offset="0.56"/>
        <GradientStop Color="#FFFFBA74" Offset="0"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="PanelBackground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="PanelBorderBrush" Color="#FF848484"/>
    <SolidColorBrush x:Key="ClockBackground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ClockInnerBorderBrush" Color="White"/>
    <CornerRadius x:Key="ClockOuterBorderCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="ClockInnerBorderCornerRadius">0</CornerRadius>
    <Thickness x:Key="ClockItemPadding">5 3</Thickness>
    <Thickness x:Key="ClockButtonChromeMargin">2</Thickness>
    <Thickness x:Key="ClockItemsMargin">1 0 1 1</Thickness>
    <ControlTemplate x:Key="CalendarIcon" TargetType="ContentControl">
        <Grid>
            <Path x:Name="CalendarIconBackground"
                    Margin="4 5 4 4"
                    Width="7"
                    Height="7"
                    Stroke="{TemplateBinding Background}"
                    Data="M0,0.5 L7,0.5 M0,2.5 L7,2.5 M0,4.5 L7,4.5 M0,6.5 L7,6.5 M0.5,0 L0.5,7 M2.5,0 L2.5,7 M4.5,0 L4.5,7 M6.5,0 L6.5,7"/>
            <Path x:Name="CalendarIconForeground"
                    Margin="4 4 4 5"
                    Width="7"
                    Height="7"
                    Stroke="{TemplateBinding Foreground}"
                    Data="M0,0.5 L7,0.5 M0,2.5 L7,2.5 M0,4.5 L7,4.5 M0,6.5 L7,6.5 M0.5,0 L0.5,7 M2.5,0 L2.5,7 M4.5,0 L4.5,7 M6.5,0 L6.5,7"/>
        </Grid>
    </ControlTemplate>
    <SolidColorBrush x:Key="CalendarOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="CalendarInnerBorder" Color="Transparent"/>
    <CornerRadius x:Key="CalendarOuterBorderCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="CalendarInnerBorderCornerRadius">0</CornerRadius>
    <Thickness x:Key="CalendarTransitionPanelMargin">0 0 0 0</Thickness>
    <Thickness x:Key="CalendarHeaderBorderThickness">1</Thickness>
    <CornerRadius x:Key="CalendarHeaderOuterCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="CalendarHeaderInnerCornerRadius">0</CornerRadius>
    <SolidColorBrush x:Key="CalendarSubHeaderOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="CalendarSubHeaderInnerBorder" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="CalendarSubHeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
        <GradientStop Color="#FFCECECE" Offset="0.42"/>
        <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
    </LinearGradientBrush>
    <Thickness x:Key="CalendarHeaderPadding">0</Thickness>
    <Thickness x:Key="CalendarViewMargin">-1 -1 0 0</Thickness>
    <Thickness x:Key="CalendarViewHeaderPadding">3</Thickness>
    <Thickness x:Key="CalendarViewHeaderMargin">0 0 0 0</Thickness>
    <SolidColorBrush x:Key="CalendarViewBackground" Color="#FFFFFFFF"/>
    <Thickness x:Key="CalendarViewBorderThickness">1</Thickness>
    <Thickness x:Key="CalendarItemsMargin">1 0 1 1</Thickness>
    <Thickness x:Key="CalendarButtonButtonChromeMargin">2</Thickness>
    <Thickness x:Key="CalendarButtonTodayVisualMargin">1</Thickness>
    <sys:Int32 x:Key="CalendarWeekHeaderVerticalOuterBorderZIndex">0</sys:Int32>
    <sys:Int32 x:Key="CalendarWeekHeaderHorizontalOuterBorderZIndex">0</sys:Int32>
    <sys:Int32 x:Key="CalendarWeekHeaderVerticalInnerBorderZIndex">0</sys:Int32>
    <sys:Int32 x:Key="CalendarWeekHeaderHorizontalInnerBorderZIndex">0</sys:Int32>
    <sys:Int32 x:Key="CalendarWeekHeaderVerticalBackgroundZIndex">0</sys:Int32>
    <sys:Int32 x:Key="CalendarWeekHeaderHorizontalBackgroundZIndex">0</sys:Int32>
    <SolidColorBrush x:Key="CalendarWeekHeaderVerticalOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="CalendarWeekHeaderHorizontalOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="CalendarWeekHeaderVerticalInnerBorder" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="CalendarWeekHeaderHorizontalInnerBorder" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="CalendarWeekHeaderVerticalBackground" Color="#FFE4E4E4"/>
    <SolidColorBrush x:Key="CalendarWeekHeaderHorizontalBackground" Color="#FFE4E4E4"/>
    <Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderThickness">1 0 1 1</Thickness>
    <Thickness x:Key="CalendarWeekHeaderHorizontalOuterBorderThickness">1 0 1 1</Thickness>
    <Thickness x:Key="CalendarWeekHeaderVerticalInnerBorderThickness">1</Thickness>
    <Thickness x:Key="CalendarWeekHeaderHorizontalInnerBorderThickness">1</Thickness>
    <Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderMargin">0 0 -1 0</Thickness>
    <Thickness x:Key="CalendarWeekHeaderHorizontalOuterBorderMargin">0 0 0 0</Thickness>
    <Thickness x:Key="CalendarWeekHeaderVerticalInnerBorderMargin">1 1 0 1</Thickness>
    <Thickness x:Key="CalendarWeekHeaderHorizontalInnerBorderMargin">1 0 1 1</Thickness>
    <Thickness x:Key="CalendarWeekHeaderVerticalBackgroundMargin">2 2 1 2</Thickness>
    <Thickness x:Key="CalendarWeekHeaderHorizontalBackgroundMargin">2 1 2 2</Thickness>
    <TextDecorationCollection x:Key="HeaderButtonTextDecoration">Underline</TextDecorationCollection>
    <ControlTemplate x:Key="ArrowTemplate_Up" TargetType="ContentControl">
        <Grid Margin="5 0">
            <Path x:Name="BackgroundIcon" Data="M0,1 L1,0 2,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Background}" Margin="0 2 0 0"/>
            <Path x:Name="ForegroundIcon" Data="M0,1 L1,0 2,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Margin="0 1 0 1"/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ArrowTemplate_Down" TargetType="ContentControl">
        <Grid Margin="5 0">
            <Path x:Name="BackgroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Background}" Margin="0 2 0 0"/>
            <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Margin="0 1 0 1"/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ArrowTemplateEditableCombobox" TargetType="ContentControl">
        <Grid Margin="5 0">
            <Path x:Name="BackgroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Background}" Margin="0 2 0 0"/>
            <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Margin="0 1 0 1"/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ArrowTemplateNonEditableCombobox" TargetType="ContentControl">
        <Grid Margin="5 0">
            <Path x:Name="BackgroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Background}" Margin="0 2 0 0"/>
            <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Margin="0 1 0 1"/>
        </Grid>
    </ControlTemplate>
    <SolidColorBrush x:Key="Calculator_Background" Color="#FFDEDEDE"/>
    <SolidColorBrush x:Key="Calculator_BorderBrush" Color="#FF848484"/>
    <LinearGradientBrush x:Key="OperatorsButton_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF6F6F6" Offset="1"/>
        <GradientStop Color="#FFD2D2D2"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MemoryButton_Background" Color="#FFCCCCCC"/>
    <LinearGradientBrush x:Key="CalculatorResults_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White"/>
        <GradientStop Color="#FFD4D4D4" Offset="1"/>
        <GradientStop Color="Gainsboro" Offset="0.196"/>
        <GradientStop Color="#FFADADAD" Offset="0.2"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="CalculatorResults_InnerBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF202020"/>
        <GradientStop Color="#FF767676" Offset="0.8"/>
        <GradientStop Color="Black" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="Calculator_Foreground" Color="White"/>
    <SolidColorBrush x:Key="CalculatorResults_OuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="CalculatorResults_InnerBorder" Color="White"/>
    <LinearGradientBrush x:Key="CalculatorResults_TransparentBackground" EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
        <GradientStop Offset="0.3"/>
        <GradientStop Color="#CCFFFFFF"/>
        <GradientStop Color="#4CFFFFFF" Offset="1"/>
        <GradientStop Offset="0.75"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="CalculatorPicker_BorderBrush" Color="#FF848484"/>
    <SolidColorBrush x:Key="CalculatorPicker_Background" Color="White"/>
    <SolidColorBrush x:Key="CalculatorPicker_Foreground" Color="Black"/>
    <SolidColorBrush x:Key="ControlBackground_ReadOnly" Color="#5EC9C9C9"/>
    <ControlTemplate x:Key="ErrorTooltipTemplate" TargetType="ToolTip">
        <Grid x:Name="RootVisual" HorizontalAlignment="Right" RenderTransformOrigin="0 0" Opacity="0" Margin="5 0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition To="Open" GeneratedDuration="0:0:0.2">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2">
                                    <DoubleAnimation.EasingFunction>
                                        <BackEase Amplitude=".3" EasingMode="EaseOut"/>
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"/>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0"/>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Border
                    MinHeight="22"
                    Background="{StaticResource ValidationTooltipBackground}"
                    BorderBrush="{StaticResource ValidationTooltipOuterBorder}"
                    BorderThickness="1"
                    CornerRadius="{StaticResource ValidationTooltipCornerRadius}">
                <Border BorderBrush="{StaticResource ValidationTooltipInnerBorder}" BorderThickness="1">
                    <ContentPresenter TextBlock.Foreground="{StaticResource ValidationTooltipForeground}" Content="{Binding ErrorContent}" Margin="4 0 4 1"/>
                </Border>
            </Border>
            <ContentControl/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ValidationTooltipTemplate">
        <Grid SnapsToDevicePixels="True" VerticalAlignment="Top">
            <Border Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Width="3" Height="3"/>
            <AdornedElementPlaceholder x:Name="Holder"/>
            <Border BorderBrush="{StaticResource ValidationTooltipOuterBorder}" BorderThickness="1" CornerRadius="{StaticResource ValidationTooltip_CornerRadius}"/>
            <Path Data="M2,1 L6,1 6,5 Z" Fill="{StaticResource ValidationInnerTick}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <Path Data="M0,0 L2,0 7,5 7,7 Z" Fill="{StaticResource ValidationOuterTick}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <ToolTipService.ToolTip>
                <ToolTip x:Name="PART_ToolTip"
                        DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=PlacementTarget.DataContext}"
                        Template="{StaticResource ErrorTooltipTemplate}"
                        Placement="Right"/>
            </ToolTipService.ToolTip>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterPressedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundIsHidden">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundIsVisible"/>
                            </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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.115">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Normal}"/>
                        </Border>
                        <Border x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{StaticResource ControlBackground_MouseOver}"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_MouseOver}"/>
                        </Border>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{StaticResource ControlBackground_Pressed}"
                                BorderBrush="{StaticResource ControlOuterBorder_Pressed}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Pressed}"/>
                        </Border>
                        <Border x:Name="DisabledVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Visibility="Collapsed"
                                BorderBrush="{StaticResource ControlInnerBorder_Disabled}"
                                Background="{StaticResource ControlBackground_Disabled}"/>
                        <ContentPresenter x:Name="Content"
                                TextBlock.Foreground="{TemplateBinding Foreground}"
                                Margin="{TemplateBinding Padding}"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                RecognizesAccessKey="True"/>
                        <Border x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    Visibility="Collapsed"
                                    Background="{StaticResource ControlBackground_Focused}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Focused}">
                                <Border BorderThickness="1" BorderBrush="{StaticResource ControlInnerBorder_Focused}" CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadPathButtonPathStyle" TargetType="Path">
        <Setter Property="Fill" Value="{StaticResource ControlElement_Normal}"/>
        <Setter Property="Margin" Value="3"/>
        <Setter Property="Stretch" Value="Fill"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="RadPathButtonStyle" TargetType="telerik1:RadPathButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="PathStyle" Value="{StaticResource RadPathButtonPathStyle}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadPathButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterPressedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Path" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundIsHidden">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundIsVisible"/>
                            </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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.115">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ContentPlacement">
                                <VisualState x:Name="ContentPlacementAtLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>0</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ContentPlacementAtTop">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>0</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ContentPlacementAtRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ContentPlacementAtBottom">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Normal}"/>
                        </Border>
                        <Border x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{StaticResource ControlBackground_MouseOver}"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_MouseOver}"/>
                        </Border>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{StaticResource ControlBackground_Pressed}"
                                BorderBrush="{StaticResource ControlOuterBorder_Pressed}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Pressed}"/>
                        </Border>
                        <Border x:Name="DisabledVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Visibility="Collapsed"
                                BorderBrush="{StaticResource ControlInnerBorder_Disabled}"
                                Background="{StaticResource ControlBackground_Disabled}"/>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Path x:Name="Path" Grid.Column="1" Grid.Row="1" Style="{TemplateBinding PathStyle}" Data="{TemplateBinding PathGeometry}"/>
                            <ContentPresenter x:Name="Content"
                                    Grid.Column="1"
                                    Grid.Row="2"
                                    Margin="{TemplateBinding Padding}"
                                    TextBlock.Foreground="{TemplateBinding Foreground}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    RecognizesAccessKey="True"/>
                        </Grid>
                        <Border x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    Visibility="Collapsed"
                                    Background="{StaticResource ControlBackground_Focused}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Focused}">
                                <Border BorderThickness="1" BorderBrush="{StaticResource ControlInnerBorder_Focused}" CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadToggleButtonStyle" TargetType="telerik1:RadToggleButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadToggleButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterPressedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </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="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <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="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundIsHidden">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundIsVisible"/>
                            </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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.115">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Normal}"/>
                        </Border>
                        <Border x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{StaticResource ControlBackground_MouseOver}"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}">
                            <Border
                                    Background="{x:Null}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource ControlInnerBorder_MouseOver}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                        </Border>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{StaticResource ControlOuterBorder_Pressed}"
                                Background="{StaticResource ControlBackground_Pressed}">
                            <Border
                                    Background="{x:Null}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Pressed}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                        </Border>
                        <Border x:Name="DisabledVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Visibility="Collapsed"
                                BorderBrush="{StaticResource ControlInnerBorder_Disabled}"
                                Background="{StaticResource ControlBackground_Disabled}"/>
                        <Grid x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    Visibility="Collapsed"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    Background="{StaticResource ControlBackground_Focused}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Focused}">
                                <Border x:Name="FocusInnerVisual"
                                        Background="{x:Null}"
                                        BorderThickness="1"
                                        BorderBrush="{StaticResource ControlInnerBorder_Focused}"
                                        CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                            </Border>
                            <Border x:Name="CheckedVisual"
                                    Opacity="0"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Checked}"
                                    Background="{StaticResource ControlBackground_Checked}">
                                <Border x:Name="InnerCheckedVisual"
                                        Background="{x:Null}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        BorderBrush="{StaticResource ControlInnerBorder_Checked}"
                                        CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                            </Border>
                        </Grid>
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                RecognizesAccessKey="True"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRadioButtonStyle" TargetType="telerik1:RadRadioButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadRadioButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterPressedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </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="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <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="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlInnerBorder_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundIsHidden">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundIsVisible"/>
                            </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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.115">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Normal}"/>
                        </Border>
                        <Border x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{StaticResource ControlBackground_MouseOver}"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_MouseOver}"/>
                        </Border>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{StaticResource ControlBackground_Pressed}"
                                BorderBrush="{StaticResource ControlOuterBorder_Pressed}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Pressed}"/>
                        </Border>
                        <Border x:Name="DisabledVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Visibility="Collapsed"
                                BorderBrush="{StaticResource ControlInnerBorder_Disabled}"
                                Background="{StaticResource ControlBackground_Disabled}"/>
                        <Grid x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    Visibility="Collapsed"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    Background="{StaticResource ControlBackground_Focused}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Focused}">
                                <Border x:Name="FocusInnerVisual"
                                        Background="{x:Null}"
                                        BorderThickness="1"
                                        BorderBrush="{StaticResource ControlInnerBorder_Focused}"
                                        CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                            </Border>
                            <Border x:Name="CheckedVisual"
                                    Opacity="0"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Checked}"
                                    Background="{StaticResource ControlBackground_Checked}">
                                <Border x:Name="InnerCheckedVisual"
                                        Background="{x:Null}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        BorderBrush="{StaticResource ControlInnerBorder_Checked}"
                                        CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                            </Border>
                        </Grid>
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                RecognizesAccessKey="True"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadDropDownButtonStyle" TargetType="telerik1:RadDropDownButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}"/>
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadDropDownButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterPressedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </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="BackgroundIsHidden">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundIsVisible"/>
                            </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"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.115">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <Border
                                    Background="{x:Null}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Normal}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                        </Border>
                        <Border x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{StaticResource ControlBackground_MouseOver}"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}">
                            <Border
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{x:Null}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"
                                    BorderBrush="{StaticResource ControlInnerBorder_MouseOver}"/>
                        </Border>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{StaticResource ControlBackground_Pressed}"
                                BorderBrush="{StaticResource ControlOuterBorder_Pressed}">
                            <Border
                                    Background="{x:Null}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Pressed}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                        </Border>
                        <Border x:Name="DisabledVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Visibility="Collapsed"
                                BorderBrush="{StaticResource ControlInnerBorder_Disabled}"
                                Background="{StaticResource ControlBackground_Disabled}"/>
                        <Border x:Name="CheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{StaticResource ControlBackground_Checked}"
                                BorderBrush="{StaticResource ControlOuterBorder_Checked}">
                            <Border x:Name="InnerCheckedVisual"
                                    Background="{x:Null}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Checked}"
                                    CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                        </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"
                                    TextBlock.Foreground="{TemplateBinding Foreground}"
                                    Margin="{TemplateBinding Padding}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    RecognizesAccessKey="True"/>
                            <Grid x:Name="DropDownIndicator"
                                    IsHitTestVisible="False"
                                    Grid.Column="1"
                                    Grid.Row="2"
                                    HorizontalAlignment="Center"
                                    Canvas.ZIndex="2"
                                    VerticalAlignment="Center"
                                    RenderTransformOrigin="0.5,0.5"
                                    Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                                    Margin="5 3">
                                <Path
                                        Data="M0,0 L2,0 1,1 Z"
                                        Margin="0 2 0 0"
                                        Stretch="Fill"
                                        Width="{StaticResource ControlElement_Width}"
                                        Height="{StaticResource ControlElement_Height}"
                                        Fill="{StaticResource ControlElement_InnerNormal}"/>
                                <Path x:Name="Path"
                                        Data="M0,0 L2,0 1,1 Z"
                                        Margin="0 1"
                                        Fill="{StaticResource ControlElement_Normal}"
                                        Width="{StaticResource ControlElement_Width}"
                                        Height="{StaticResource ControlElement_Height}"
                                        Stretch="Fill"/>
                            </Grid>
                        </Grid>
                        <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom">
                            <Grid>
                                <Border x:Name="DropDownPopupBorder"
                                        BorderThickness="1"
                                        MinWidth="3"
                                        MinHeight="3"
                                        Width="{TemplateBinding DropDownWidth}"
                                        Height="{TemplateBinding DropDownHeight}"
                                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                        MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                        Background="{StaticResource ControlBackground}"
                                        BorderBrush="{StaticResource ControlOuterBorder}">
                                    <ContentControl x:Name="DropDownPopupContent"
                                            Content="{TemplateBinding DropDownContent}"
                                            HorizontalContentAlignment="Stretch"
                                            VerticalContentAlignment="Stretch"
                                            ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Stretch"
                                            DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"
                                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                            ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                                </Border>
                            </Grid>
                        </Popup>
                        <Border x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    Visibility="Collapsed"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    Background="{StaticResource ControlBackground_Focused}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Focused}">
                                <Border x:Name="FocusInnerVisual"
                                        Background="{x:Null}"
                                        BorderThickness="1"
                                        BorderBrush="{StaticResource ControlInnerBorder_Focused}"
                                        CornerRadius="{TemplateBinding InnerCornerRadius}"/>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadSplitButtonStyle" TargetType="telerik1:RadSplitButton">
        <Setter Property="IsTabStop" Value="true"/>
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="ButtonPartStyle" Value="{StaticResource RadButtonStyle}"/>
        <Setter Property="TogglePartStyle" Value="{StaticResource RadToggleButtonStyle}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="{StaticResource ControlOuterBorder_CornerRadius}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadSplitButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="IsCheckedState">
                                <VisualState x:Name="UnChecked"/>
                                <VisualState x:Name="Checked"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="IsOpenState">
                                <VisualState x:Name="Closed"/>
                                <VisualState x:Name="Opened">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="IsOpenOrChecked">
                                <VisualState x:Name="OpenOrChecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Checked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="IsBackgroundVisible">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NotOpenNotChecked"/>
                            </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>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 -1 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="CornerRadius" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_LeftPartCornerRadius}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="CornerRadius" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_RightPartCornerRadius}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>0</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_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 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>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 -1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="CornerRadius" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_TopPartCornerRadius}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="CornerRadius" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_BottomPartCornerRadius}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_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 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>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>-1 0 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_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 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>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 -1 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="CornerRadius" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_BottomPartCornerRadius}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="CornerRadius" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SplitButton_TopPartCornerRadius}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_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="ButtonPartVisibility">
                                <VisualState x:Name="ButtonInvisible">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 0</Thickness>
                                                </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="(Grid.RowSpan)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>3</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <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="PART_DropDownIndicator" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>0</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="(Grid.RowSpan)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>3</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>0</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownIndicator" Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>3</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ButtonVisible"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundIsHidden"/>
                                <VisualState x:Name="BackgroundIsVisible"/>
                            </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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.115">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <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>
                            <telerik1:RadButton x:Name="ButtonPart"
                                    IsTabStop="False"
                                    Grid.Row="1"
                                    Grid.Column="1"
                                    Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=IsButtonPartVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                                    Background="{TemplateBinding Background}"
                                    Style="{TemplateBinding ButtonPartStyle}"
                                    Padding="{TemplateBinding Padding}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    IsBackgroundVisible="{TemplateBinding IsBackgroundVisible}"
                                    Foreground="{TemplateBinding Foreground}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                    MinHeight="{TemplateBinding MinHeight}"
                                    CornerRadius="{StaticResource SplitButton_LeftPartCornerRadius}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    Focusable="False"/>
                            <Border x:Name="CheckedVisual"
                                    Visibility="Collapsed"
                                    Grid.Row="1"
                                    Grid.Column="1"
                                    Margin="1"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{StaticResource ControlInnerBorder_Checked}"
                                    Background="{x:Null}"
                                    CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}"/>
                            <telerik1:RadToggleButton x:Name="DropDownPart"
                                    Margin="-1 0 0 0"
                                    Grid.Row="1"
                                    Grid.Column="2"
                                    IsTabStop="False"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    Background="{TemplateBinding Background}"
                                    Style="{TemplateBinding TogglePartStyle}"
                                    Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                                    FontSize="{TemplateBinding FontSize}"
                                    IsBackgroundVisible="{TemplateBinding IsBackgroundVisible}"
                                    IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                    MinHeight="9"
                                    MinWidth="15"
                                    CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}"
                                    Focusable="False"/>
                            <Grid x:Name="PART_DropDownIndicator"
                                    IsHitTestVisible="False"
                                    HorizontalAlignment="Center"
                                    Canvas.ZIndex="2"
                                    VerticalAlignment="Center"
                                    RenderTransformOrigin="0.5,0.5"
                                    Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                                    Margin="-1 0 0 0"
                                    Column="1"
                                    Row="2">
                                <Path
                                        Data="M0,0 L2,0 1,1 Z"
                                        Margin="0 2 0 0"
                                        Stretch="Fill"
                                        Width="{StaticResource ControlElement_Width}"
                                        Height="{StaticResource ControlElement_Height}"
                                        Fill="{StaticResource ControlElement_InnerNormal}"/>
                                <Path x:Name="Path"
                                        Margin="0 1"
                                        Data="M0,0 L2,0 1,1 Z"
                                        Fill="{StaticResource ControlElement_Normal}"
                                        Width="{StaticResource ControlElement_Width}"
                                        Height="{StaticResource ControlElement_Height}"
                                        Stretch="Fill"/>
                            </Grid>
                        </Grid>
                        <Border x:Name="MouseOverVisual"
                                Visibility="Collapsed"
                                Background="{x:Null}"
                                BorderThickness="1"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                IsHitTestVisible="False"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"/>
                        <Border x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    Visibility="Collapsed"
                                    Background="{x:Null}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    BorderBrush="{StaticResource ControlOuterBorder_Focused}">
                                <Border x:Name="FocusInnerVisual"
                                        BorderThickness="1"
                                        Background="{x:Null}"
                                        CornerRadius="{TemplateBinding InnerCornerRadius}"
                                        BorderBrush="{StaticResource ControlInnerBorder_Focused}"/>
                            </Border>
                        </Border>
                        <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom">
                            <Grid>
                                <Border x:Name="DropDownPopupBorder"
                                        BorderThickness="1"
                                        MinWidth="3"
                                        MinHeight="3"
                                        Width="{TemplateBinding DropDownWidth}"
                                        Height="{TemplateBinding DropDownHeight}"
                                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                        MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                        CornerRadius="{TemplateBinding CornerRadius}"
                                        Background="{StaticResource ControlBackground}"
                                        BorderBrush="{StaticResource ControlOuterBorder}">
                                    <ContentControl x:Name="DropDownPopupContent"
                                            Content="{TemplateBinding DropDownContent}"
                                            ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                            HorizontalContentAlignment="Stretch"
                                            VerticalContentAlignment="Stretch"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Stretch"
                                            DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                                </Border>
                            </Grid>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
    <Style TargetType="telerik1:RadPathButton" BasedOn="{StaticResource RadPathButtonStyle}"/>
    <Style TargetType="telerik1:RadToggleButton" BasedOn="{StaticResource RadToggleButtonStyle}"/>
    <Style TargetType="telerik1:RadRadioButton" BasedOn="{StaticResource RadRadioButtonStyle}"/>
    <Style TargetType="telerik1:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}"/>
    <Style TargetType="telerik1:RadSplitButton" BasedOn="{StaticResource RadSplitButtonStyle}"/>
    <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverterInstance"/>
    <telerikMaskedInput:HorizontalContentAlignmentToTextAlignmentConverter x:Key="HorizontalContentAlignmentToTextAlignmentConverter"/>
    <SolidColorBrush x:Key="Rating_ReadOnlyBackground" Color="#83FFFFFF"/>
    <SolidColorBrush x:Key="Rating_ReadOnlyBorderBrush" Color="#A5F7F7F7"/>
    <SolidColorBrush x:Key="Rating_Background" Color="Transparent"/>
    <SolidColorBrush x:Key="Rating_BorderBrush" Color="Transparent"/>
    <LinearGradientBrush x:Key="RatingItem_SelectedBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFD74E" Offset="0.996"/>
        <GradientStop Color="#FFFFDCAB"/>
        <GradientStop Color="#FFFE9227" Offset="0.616"/>
        <GradientStop Color="#FFFFD18F" Offset="0.608"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RatingItem_SelectedBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF353535" Offset="1"/>
        <GradientStop Color="#FF7E7E7E"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RatingItem_Background" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="RatingItem_BorderBrush" Color="#FF848484"/>
    <LinearGradientBrush x:Key="RatingItem_MouseOverBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF353535" Offset="1"/>
        <GradientStop Color="#FF7E7E7E"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RatingItem_MouseOverBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFEC344" Offset="0.996"/>
        <GradientStop Color="#FFFEF7D3"/>
        <GradientStop Color="#FFFAB900" Offset="0.616"/>
        <GradientStop Color="#FFFEDC73" Offset="0.608"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RatingItem_SelectedUnHoveredBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#99FEF497" Offset="0.996"/>
        <GradientStop Color="#99FFFCED"/>
        <GradientStop Color="#99FED35D" Offset="0.616"/>
        <GradientStop Color="#99FDEBAF" Offset="0.608"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RatingItem_SelectedDisabledBackground" Color="#FFacabab"/>
    <Style x:Key="RadWatermarkTextBoxStyle" TargetType="telerik1:RadWatermarkTextBox">
        <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}"/>
        <Setter Property="Padding" Value="5 2"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="Background" Value="{StaticResource PickerBackground_Normal}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadWatermarkTextBox">
                    <Grid x:Name="RootElement" Cursor="IBeam">
                        <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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                        <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_ContentHost"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation To="1" Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="WatermarkStates">
                                <VisualState x:Name="WatermarkHidden">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="WatermarkVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="WatermarkVisible"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                                Opacity="1"/>
                        <Border x:Name="ReadOnlyVisualElement" Background="{StaticResource ControlBackground_ReadOnly}" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Opacity="0"/>
                        <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"/>
                        <Border x:Name="DisabledVisualElement"
                                BorderBrush="{StaticResource ControlOuterBorder_Disabled}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{StaticResource ControlBackground_Disabled}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                                IsHitTestVisible="False"
                                Opacity="0"/>
                        <ScrollViewer x:Name="PART_ContentHost"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                BorderThickness="0"
                                IsTabStop="False"
                                Cursor="Arrow"
                                Padding="{TemplateBinding Padding}"
                                Margin="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                IsHitTestVisible="False"
                                Grid.RowSpan="2"
                                Grid.ColumnSpan="2"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"/>
                        <ContentControl x:Name="WatermarkVisualElement"
                                IsTabStop="False"
                                Opacity="0.5"
                                FontStyle="Italic"
                                Content="{TemplateBinding WatermarkContent}"
                                ContentTemplate="{TemplateBinding WatermarkTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                IsHitTestVisible="False"
                                Padding="{TemplateBinding Padding}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Foreground="{TemplateBinding Foreground}"
                                Margin="2 0 0 0">
                            <ContentControl.Template>
                                <ControlTemplate TargetType="ContentControl">
                                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{x:Null}">
                                        <ContentPresenter Margin="{TemplateBinding Padding}"/>
                                    </Border>
                                </ControlTemplate>
                            </ContentControl.Template>
                        </ContentControl>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadWatermarkTextBox" BasedOn="{StaticResource RadWatermarkTextBoxStyle}"/>
    <Style x:Key="ComboBoxTextBoxStyle" TargetType="TextBox">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
    </Style>
    <ControlTemplate x:Key="EditableComboBox" TargetType="controls: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>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PART_EditableTextBox" Storyboard.TargetProperty="Opacity" To="0.6"/>
                            <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>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                <LinearDoubleKeyFrame KeyTime="0" Value="0.6"/>
                            </DoubleAnimationUsingKeyFrames>
                        </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}" Margin="1"/>
            <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"
                    Margin="1 1 0 1"
                    Style="{StaticResource ComboBoxTextBoxStyle}"
                    Padding="{TemplateBinding Padding}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    VerticalAlignment="Stretch"
                    VerticalContentAlignment="Center"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
                <TextBox.Template>
                    <ControlTemplate TargetType="TextBox">
                        <Grid>
                            <ScrollViewer
                                    Padding="{TemplateBinding Padding}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{TemplateBinding Background}"
                                    IsTabStop="False"
                                    VerticalScrollBarVisibility="Auto"
                                    x:Name="PART_ContentHost"
                                    VerticalContentAlignment="Stretch"/>
                        </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}"
                            x:Name="PART_ResizeBorder">
                        <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="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    Foreground="{TemplateBinding Foreground}"
                                    CanContentScroll="True">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="NonEditableComboBox" TargetType="controls: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>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.6"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledBorder" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </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>
                    <Border x:Name="DisabledBorder"
                            IsHitTestVisible="False"
                            BorderBrush="{StaticResource ControlOuterBorder_Disabled}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Opacity="0"
                            CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                            Grid.ColumnSpan="2"/>
                    <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}"/>
                    <Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}" IsHitTestVisible="False" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" Margin="1"/>
                    <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}"
                            x:Name="PART_ResizeBorder">
                        <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"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                    CanContentScroll="True">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadComboBoxItemStyle" TargetType="controls: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="controls: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 x:Key="RadComboBoxStyle" TargetType="controls: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="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
    </Style>
    <Style TargetType="controls:RadComboBoxItem" BasedOn="{StaticResource RadComboBoxItemStyle}"/>
    <Style TargetType="controls:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle}"/>
    <ControlTemplate x:Key="IncreaseButtonTemplate" 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}" Background="{TemplateBinding Background}" IsTabStop="False"/>
        </Grid>
    </ControlTemplate>
    <Style TargetType="RepeatButton" x:Key="IncreaseButtonStyle">
        <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" Value="{StaticResource IncreaseButtonTemplate}"/>
    </Style>
    <ControlTemplate x:Key="DecreaseButtonTemplate" 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}" Background="{TemplateBinding Background}" IsTabStop="False"/>
        </Grid>
    </ControlTemplate>
    <Style TargetType="RepeatButton" x:Key="DecreaseButtonStyle">
        <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" Value="{StaticResource DecreaseButtonTemplate}"/>
    </Style>
    <ControlTemplate x:Key="RadNumericUpDownTemplate" TargetType="controls: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>
                            <DoubleAnimation To="0.6" Duration="0" Storyboard.TargetName="textbox" Storyboard.TargetProperty="Opacity"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textbox" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation To="0.6" Duration="0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity"/>
                            <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">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decrease" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <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">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="decrease" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <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="Stretch"
                    TextAlignment="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=HorizontalContentAlignment, Converter={StaticResource HorizontalContentAlignmentToTextAlignmentConverter}}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                <TextBox.Template>
                    <ControlTemplate TargetType="TextBox">
                        <ScrollViewer
                                Padding="{TemplateBinding Padding}"
                                BorderBrush="Transparent"
                                Background="Transparent"
                                BorderThickness="0"
                                IsTabStop="False"
                                VerticalScrollBarVisibility="Auto"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                x:Name="PART_ContentHost"/>
                    </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="controls:RadNumericUpDown">
        <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}"/>
        <Setter Property="Padding" Value="4 0"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="MinWidth" Value="60"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Template" Value="{StaticResource RadNumericUpDownTemplate}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
    </Style>
    <Style TargetType="controls:RadNumericUpDown" BasedOn="{StaticResource RadNumericUpDownStyle}"/>
    <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
    <telerik1:LocalizationManager x:Key="localizationManager"/>
    <Style TargetType="telerik1:RadButton" x:Key="RadColorPicker_HeaderButtonStyle">
        <Setter Property="Foreground" Value="{StaticResource ColorPicker_Foreground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ColorPicker_HeaderButtonOuterColorStroke}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity" Duration="0" 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>
                        <Border
                                HorizontalAlignment="Left"
                                MinWidth="25"
                                Background="{StaticResource ColorPicker_HeaderButtonBackground}"
                                BorderBrush="{StaticResource ColorPicker_HeaderButtonBorder}"
                                BorderThickness="0 0 1 0"/>
                        <Border x:Name="MouseOverVisual"
                                Grid.ColumnSpan="2"
                                Opacity="0"
                                Background="{StaticResource ColorPicker_HeaderButtonInnerBackground_MouseOver}"
                                BorderBrush="{StaticResource ColorPicker_HeaderButtonOuterBorder_MouseOver}"
                                BorderThickness="1"
                                CornerRadius="{StaticResource ColorPicker_HeaderButtonOuterBorder_CornerRadius}">
                            <Border
                                    BorderThickness="1"
                                    Background="{x:Null}"
                                    CornerRadius="{StaticResource ColorPicker_HeaderButtonInnerBorder_CornerRadius}"
                                    BorderBrush="{StaticResource ColorPicker_HeaderButtonInnerBorder_MouseOver}"/>
                        </Border>

                        <!-- this x:Name is called from code -->
                        <Border x:Name="rectangleborder"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                BorderThickness="1"
                                Margin="2 2 3 2"
                                CornerRadius="2">
                            <Rectangle
                                    Fill="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                    VerticalAlignment="Center"
                                    Stroke="{StaticResource ColorPicker_HeaderButtonInnerColorStroke}"
                                    Width="14"
                                    Height="14"
                                    Margin="1"/>
                        </Border>
                        <ContentControl
                                Grid.Column="1"
                                x:Name="contentPresenter"
                                Margin="7 0 0 0"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Left"
                                Foreground="{TemplateBinding Foreground}"
                                FontSize="{TemplateBinding FontSize}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <colorPaletteConverters:PositionStateToBorderThicknessConverter x:Key="PositionConverter"/>
    <Style x:Key="RadColorPaletteViewItemStyle" TargetType="controls:RadColorPaletteViewItem">
        <Setter Property="Margin" Value="2 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorPaletteViewItem">
                    <Grid x:Name="RootElement" SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="SelectedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter x:Name="Content" ToolTipService.ToolTip="{Binding}" MinHeight="11" MinWidth="11"/>
                        <Border
                                MinHeight="13"
                                MinWidth="13"
                                x:Name="NormalVisual"
                                VerticalAlignment="Stretch"
                                BorderThickness="{Binding PositionState, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource PositionConverter}}"
                                BorderBrush="{StaticResource ColorPaletteViewItem_Border}">
                            <Border BorderThickness="1" x:Name="InnerborderContent"/>
                        </Border>
                        <Border x:Name="MouseOverVisual"
                                MinHeight="13"
                                MinWidth="13"
                                VerticalAlignment="Stretch"
                                BorderThickness="1"
                                Opacity="0"
                                BorderBrush="{StaticResource ColorPaletteViewItem_OuterBorder_MouseOver}"/>
                        <Border x:Name="SelectedVisual"
                                MinHeight="13"
                                MinWidth="13"
                                VerticalAlignment="Stretch"
                                BorderThickness="1"
                                Opacity="0"
                                BorderBrush="{StaticResource ColorPaletteViewItem_OuterBorder_Selected}">
                            <Border BorderThickness="1" BorderBrush="{StaticResource ColorPaletteViewItem_InnerBorder_Selected}"/>
                        </Border>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                MinHeight="13"
                                MinWidth="13"
                                BorderThickness="1"
                                VerticalAlignment="Stretch"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                SnapsToDevicePixels="True"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadColorPaletteViewStyle" TargetType="controls:RadColorPaletteView">
        <Setter Property="Background" Value="{StaticResource ColorPicker_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorPaletteView">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ItemsPresenter x:Name="ItemsPresenter" Margin="0 2"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <primitives:RadUniformGrid x:Name="uniformGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Columns="10" ChildrenFlow="Vertical"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Margin" Value="0"/>
    </Style>
    <Style x:Key="RadColorSelectorStyle" TargetType="controls:RadColorSelector">
        <Setter Property="Background" Value="{StaticResource ColorPicker_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}"/>
        <Setter Property="MainPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorMainPaletteHeaderText}"/>
        <Setter Property="NoColorText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorAutomaticColorText}"/>
        <Setter Property="RecentColorsHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorRecentColorsHeaderText}"/>
        <Setter Property="StandardPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorStandardPaletteHeaderText}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource ColorPicker_Foreground}"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorSelector">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                        <Border BorderBrush="{StaticResource ColorPicker_InnerBorder}" BorderThickness="1" CornerRadius="1">
                            <Grid x:Name="RootElement" Margin="0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <telerik1:RadButton
                                        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
                                        Grid.Row="1"
                                        Background="{StaticResource ColorPicker_TitleBackground}"
                                        BorderBrush="{StaticResource ColorPicker_TitleBorder}"
                                        BorderThickness="0 0 0 1"
                                        Margin="0 0 0 3">
                                    <TextBlock x:Name="mainPaletteHeader"
                                            FontStyle="{TemplateBinding FontStyle}"
                                            FontWeight="{TemplateBinding FontWeight}"
                                            Foreground="{TemplateBinding Foreground}"
                                            VerticalAlignment="Center"
                                            Text="{TemplateBinding MainPaletteHeaderText}"
                                            FontSize="{TemplateBinding FontSize}"
                                            Margin="10 2 2 2"/>
                                </Border>
                                <controls:RadColorPaletteView x:Name="HeaderPalette"
                                        Background="{TemplateBinding Background}"
                                        Grid.Row="2"
                                        ItemTemplate="{TemplateBinding PaletteItemsTemplate}"
                                        ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                        Margin="0,0,0,-3"
                                        VerticalAlignment="Center"
                                        BorderBrush="Transparent"
                                        BorderThickness="0">
                                    <controls:RadColorPaletteView.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <primitives:RadUniformGrid Background="Transparent" Columns="10"/>
                                        </ItemsPanelTemplate>
                                    </controls:RadColorPaletteView.ItemsPanel>
                                </controls:RadColorPaletteView>
                                <controls:RadColorPaletteView x:Name="MainPalette"
                                        Grid.Row="3"
                                        Margin="0 5 0 2"
                                        ItemTemplate="{TemplateBinding PaletteItemsTemplate}"
                                        ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                        ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                                        PaletteColumnsCount="{TemplateBinding MainPaletteColumnsCount}"
                                        BorderBrush="Transparent"
                                        BorderThickness="0"
                                        Background="{TemplateBinding Background}"/>
                                <Border x:Name="StandardPaletteBorder"
                                        Grid.Row="4"
                                        Background="{StaticResource ColorPicker_TitleBackground}"
                                        BorderBrush="{StaticResource ColorPicker_TitleBorder}"
                                        BorderThickness="0 0 0 1"
                                        Margin="0 2 0 3">
                                    <TextBlock x:Name="standardPaletteHeader"
                                            FontWeight="{TemplateBinding FontWeight}"
                                            Foreground="{TemplateBinding Foreground}"
                                            VerticalAlignment="Center"
                                            Text="{TemplateBinding StandardPaletteHeaderText}"
                                            FontSize="{TemplateBinding FontSize}"
                                            Margin="10 2 2 2"/>
                                </Border>
                                <controls:RadColorPaletteView x:Name="StandartPalette"
                                        Margin="0 0 0 1"
                                        ItemTemplate="{TemplateBinding PaletteItemsTemplate}"
                                        ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                        VerticalAlignment="Center"
                                        Grid.Row="5"
                                        BorderBrush="Transparent"
                                        BorderThickness="0"
                                        Background="{TemplateBinding Background}">
                                    <controls:RadColorPaletteView.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <primitives:RadUniformGrid Background="Transparent" Columns="10"/>
                                        </ItemsPanelTemplate>
                                    </controls:RadColorPaletteView.ItemsPanel>
                                </controls:RadColorPaletteView>
                                <Border x:Name="RecentColorsPaletteBorder"
                                        Grid.Row="6"
                                        Visibility="Collapsed"
                                        Background="{StaticResource ColorPicker_TitleBackground}"
                                        BorderBrush="{StaticResource ColorPicker_TitleBorder}"
                                        BorderThickness="0 0 0 1"
                                        Margin="0 2 0 3">
                                    <TextBlock x:Name="RecentColorsPaletteHeader"
                                            FontWeight="{TemplateBinding FontWeight}"
                                            Foreground="{TemplateBinding Foreground}"
                                            VerticalAlignment="Center"
                                            Text="{TemplateBinding RecentColorsHeaderText}"
                                            FontSize="{TemplateBinding FontSize}"
                                            Margin="10 2 2 2"/>
                                </Border>
                                <controls:RadColorPaletteView
                                        Grid.Row="7"
                                        x:Name="RecentColorsPalette"
                                        Margin="0 0 0 1"
                                        ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                        BorderThickness="0"
                                        Background="{TemplateBinding Background}"
                                        Visibility="Collapsed"
                                        VerticalAlignment="Center"
                                        BorderBrush="Transparent"
                                        MinHeight="14">
                                    <controls:RadColorPaletteView.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <primitives:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                                        </ItemsPanelTemplate>
                                    </controls:RadColorPaletteView.ItemsPanel>
                                </controls:RadColorPaletteView>
                                <Border Margin="0 1 0 0" Visibility="Collapsed" x:Name="AdditionalContentBorder" Grid.Row="8" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                                    <ContentPresenter Margin="0 1 0 0" Content="{TemplateBinding AdditionalContent}" ContentTemplate="{TemplateBinding AdditionalContentTemplate}"/>
                                </Border>
                            </Grid>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ColorPickerSplitButtonStyle" TargetType="telerik1:RadSplitButton" BasedOn="{StaticResource RadSplitButtonStyle}"/>
    <Style x:Key="RadColorPickerStyle" TargetType="controls:RadColorPicker">
        <Setter Property="MainPaletteColumnsCount" Value="10"/>
        <Setter Property="MainPaletteOrientation" Value="Vertical"/>
        <Setter Property="MainPalette" Value="Office"/>
        <Setter Property="HeaderPaletteVisibility" Value="Visible"/>
        <Setter Property="MainPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorMainPaletteHeaderText}"/>
        <Setter Property="NoColorText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorAutomaticColorText}"/>
        <Setter Property="RecentColorsHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorRecentColorsHeaderText}"/>
        <Setter Property="StandardPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorStandardPaletteHeaderText}"/>
        <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="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="BorderBrush" Value="{StaticResource ColorPicker_OuterBorder}"/>
        <Setter Property="SplitButtonStyle" Value="{StaticResource ColorPickerSplitButtonStyle}"/>
        <Setter Property="ColorSelectorStyle" Value="{StaticResource RadColorSelectorStyle}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Foreground" Value="{StaticResource ColorPicker_Foreground}"/>
        <Setter Property="Background" Value="{StaticResource ColorPicker_Background}"/>
        <Setter Property="AutomaticColor" Value="Black"/>
        <Setter Property="Width" Value="43"/>
        <Setter Property="Height" Value="22"/>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.664*"/>
                            <RowDefinition Height="0.336*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Path
                                Stretch="Fill"
                                RenderTransformOrigin="0.5,0.5"
                                Grid.Column="1"
                                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"
                                Height="9.537"
                                Margin="0 0 0 3">
                            <Path.Fill>
                                <SolidColorBrush Color="#FF364F87"/>
                            </Path.Fill>
                            <Path.RenderTransform>
                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                            </Path.RenderTransform>
                        </Path>
                        <Rectangle Width="16" Height="4.232" Grid.Row="1" Grid.Column="1">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{Binding}"/>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorPicker">
                    <Grid x:Name="Root"
                            Width="{TemplateBinding Width}"
                            Height="{TemplateBinding Height}"
                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <telerik1:RadSplitButton x:Name="SplitButton"
                                Style="{TemplateBinding SplitButtonStyle}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                DropDownPlacement="{Binding Path=DropDownPlacement, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                DropDownIndicatorVisibility="Visible"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                Padding="{TemplateBinding Padding}"
                                IsOpen="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                IsChecked="{Binding Path=IsOpen, RelativeSource={RelativeSource Self}}"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}">
                            <telerik1:RadSplitButton.DropDownContent>
                                <controls:RadColorSelector x:Name="ColorSelector"
                                        Style="{TemplateBinding ColorSelectorStyle}"
                                        Command="{TemplateBinding Command}"
                                        CommandParameter="{TemplateBinding CommandParameter}"
                                        CommandTarget="{TemplateBinding CommandTarget}"
                                        ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                        MainPalette="{TemplateBinding MainPalette}"
                                        MainPaletteItemsStyle="{TemplateBinding MainPaletteItemsStyle}"
                                        MainPaletteColumnsCount="{TemplateBinding MainPaletteColumnsCount}"
                                        MainPaletteItemsSource="{TemplateBinding MainPaletteItemsSource}"
                                        MainPaletteOrientation="{TemplateBinding MainPaletteOrientation}"
                                        MainPaletteHeaderText="{TemplateBinding MainPaletteHeaderText}"
                                        HeaderPalette="{TemplateBinding HeaderPalette}"
                                        HeaderPaletteVisibility="{TemplateBinding HeaderPaletteVisibility}"
                                        HeaderPaletteItemsSource="{TemplateBinding HeaderPaletteItemsSource}"
                                        StandardPalette="{TemplateBinding StandardPalette}"
                                        StandardPaletteVisibility="{TemplateBinding StandardPaletteVisibility}"
                                        StandardPaletteHeaderText="{TemplateBinding StandardPaletteHeaderText}"
                                        StandardPaletteItemsSource="{TemplateBinding StandardPaletteItemsSource}"
                                        PaletteItemsTemplate="{TemplateBinding PaletteItemsTemplate}"
                                        AutomaticColor="{Binding AutomaticColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                        NoColorText="{TemplateBinding NoColorText}"
                                        RecentColorsHeaderText="{TemplateBinding RecentColorsHeaderText}"
                                        RecentColorsVisibility="{TemplateBinding RecentColorsVisibility}"
                                        IsRecentColorsActive="{TemplateBinding IsRecentColorsActive}"
                                        RecentColorsItemsSource="{TemplateBinding RecentColorsItemsSource}"
                                        AdditionalContent="{TemplateBinding AdditionalContent}"
                                        AdditionalContentTemplate="{TemplateBinding AdditionalContentTemplate}"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="1"
                                        NoColorVisibility="{TemplateBinding NoColorVisibility}"
                                        SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedColor, Mode=TwoWay}"
                                        SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem, Mode=TwoWay}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        FontStyle="{TemplateBinding FontStyle}"
                                        Foreground="{TemplateBinding Foreground}"
                                        Margin="-1"/>
                            </telerik1:RadSplitButton.DropDownContent>
                        </telerik1:RadSplitButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStyle}"/>
    <Style TargetType="controls:RadColorPaletteView" BasedOn="{StaticResource RadColorPaletteViewStyle}"/>
    <Style TargetType="controls:RadColorSelector" BasedOn="{StaticResource RadColorSelectorStyle}"/>
    <Style TargetType="controls:RadColorPicker" BasedOn="{StaticResource RadColorPickerStyle}"/>
    <colorPickerConverters:HueConverter x:Key="HueConverter"/>
    <colorPickerConverters:EnumConverter x:Key="EnumConverter"/>
    <colorPickerConverters:ColorToHSColorBrushConverter x:Key="ColorToHSColorBrushConverter"/>
    <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="HueBrushHorizontal" StartPoint="0, 0.5" EndPoint="1,0.5">
        <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="ZeroGrayBrush" StartPoint="0.5, 0" EndPoint="0.5, 1">
        <GradientStop Color="Transparent" Offset="0"/>
        <GradientStop Color="Gray" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ZeroToWhiteBrush" StartPoint="0.5, 1" EndPoint="0.5,0">
        <GradientStop Color="Transparent" Offset="0.1"/>
        <GradientStop Color="White" Offset="0.9"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ZeroToBlackBrush" StartPoint="0.5, 0" EndPoint="0.5,1">
        <GradientStop Color="Transparent" Offset="0.1"/>
        <GradientStop Color="Black" Offset="0.9"/>
    </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="ColorEditorThumbStyle">
        <Setter Property="Width" Value="8"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource SliderThumb_OuterBorder_Normal}"/>
        <Setter Property="Height" Value="10"/>
        <Setter Property="Focusable" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <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="Background" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOver}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_MouseOver}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOver}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Pressed}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_Pressed}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusVisual"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_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
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
                            <Border BorderThickness="1" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Normal}"/>
                        </Border>
                        <Border x:Name="Border"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{x:Null}"
                                Background="{x:Null}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
                            <Border x:Name="InnerBorder" BorderThickness="1" BorderBrush="{x:Null}" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}"/>
                        </Border>
                        <Border x:Name="FocusVisual"
                                BorderThickness="1"
                                Visibility="Collapsed"
                                BorderBrush="{StaticResource SliderOuterBorder_Focused}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <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 x:Key="RadColorEditorStyle" TargetType="controls:RadColorEditor">
        <Setter Property="Padding" Value="12"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorEditor">
                    <Border x:Name="LayoutRoot"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            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 x:Name="SectionsGrid">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" MinHeight="160"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid x:Name="SaturationValuePadGrid" 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 x:Name="HueSaturationPadGrid" Margin="0 0 3 3">
                                <Rectangle Fill="{StaticResource HueBrushHorizontal}"/>
                                <Rectangle Fill="{StaticResource ZeroGrayBrush}"/>
                                <pad:Pad x:Name="HueSaturationPad" MovementDirection="Both">
                                    <Grid>
                                        <Ellipse Stroke="Black" StrokeThickness="1" Width="12" Height="12"/>
                                        <Ellipse Stroke="White" StrokeThickness="1" Width="10" Height="10"/>
                                    </Grid>
                                </pad:Pad>
                            </Grid>
                            <Grid x:Name="InitAndCurrentColorGrid" Grid.Row="1" Margin="0 0 3 0" Height="20">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </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 Text="{telerik:LocalizableResource Key=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 Text="{telerik:LocalizableResource Key=ColorEditorSelectedColor}"/>
                                    </ToolTipService.ToolTip>
                                </Border>
                                <Border
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="1"
                                        Grid.Column="2"
                                        Width="20"
                                        Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=PreviousColor, Converter={StaticResource converter}}"
                                        Margin="1 0 0 0">
                                    <ToolTipService.ToolTip>
                                        <TextBlock Text="{telerik:LocalizableResource Key=ColorEditorPreviousColor}"/>
                                    </ToolTipService.ToolTip>
                                </Border>
                            </Grid>
                            <Grid Grid.Column="1" x:Name="HuePadGrid" Margin="0 0 0 3" Width="20">
                                <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.5,3.5 L0,7 z" Fill="Black" HorizontalAlignment="Left" Stretch="Fill" Width="3.5" Height="7"/>
                                            <Path Data="M0,3.5 L4,0 L4,7 L0,3.5 z" Fill="Black" HorizontalAlignment="Right" Stretch="Fill" Width="3.5" Height="7"/>
                                        </Grid>
                                    </pad:Pad>
                                </Border>
                            </Grid>
                            <Grid Grid.Column="1" x:Name="LuminancePadGrid" Margin="0 0 0 3" Width="20">
                                <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedColor, Converter={StaticResource ColorToHSColorBrushConverter}}"/>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <Rectangle Fill="{StaticResource ZeroToWhiteBrush}"/>
                                    <Rectangle Fill="{StaticResource ZeroToBlackBrush}" Grid.Row="1"/>
                                </Grid>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                    <pad:Pad x:Name="LuminancePad" MovementDirection="Y">
                                        <Grid Width="18" Height="7">
                                            <Path Data="M0,0 L3.5,3.5 L0,7 z" Fill="Black" HorizontalAlignment="Left" Stretch="Fill" Width="3.5" Height="7"/>
                                            <Path Data="M0,3.5 L4,0 L4,7 L0,3.5 z" Fill="Black" HorizontalAlignment="Right" Stretch="Fill" Width="3.5" Height="7"/>
                                        </Grid>
                                    </pad:Pad>
                                </Border>
                            </Grid>
                            <Grid Grid.Column="2" x:Name="ColorModesGrid" Margin="10 0 0 0" Width="170">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <controls:RadComboBox
                                        IsEditable="True"
                                        IsReadOnly="True"
                                        ItemsSource="{Binding Source={StaticResource ColorModeCollection}}"
                                        SelectedIndex="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColorMode, Mode=TwoWay, Converter={StaticResource EnumConverter}}"
                                        Margin="12 0 0 10"
                                        Width="155"
                                        HorizontalAlignment="Right"/>
                                <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" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="G" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="B" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Red, Mode=TwoWay, FallbackValue=0}"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}"
                                            Mask="#3"
                                            HorizontalAlignment="Stretch"
                                            UpdateValueEvent="LostFocus"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Green, Mode=TwoWay, FallbackValue=0}"
                                            Mask="#3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}"
                                            HorizontalAlignment="Stretch"
                                            UpdateValueEvent="LostFocus"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="2"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Blue, Mode=TwoWay, FallbackValue=0}"
                                            Mask="#3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="RgbSliderRed"
                                            Maximum="255"
                                            SmallChange="1"
                                            LargeChange="1"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Red, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="RgbSliderGreen"
                                            Maximum="255"
                                            SmallChange="1"
                                            LargeChange="1"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Green, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="RgbSliderBlue"
                                            Maximum="255"
                                            SmallChange="1"
                                            LargeChange="1"
                                            Grid.Row="2"
                                            Grid.Column="2"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Blue, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                </Grid>
                                <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" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="L" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="S" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Hue, Mode=TwoWay, FallbackValue=0}"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}°"
                                            Mask="#3°"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Luminance, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="2"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Saturation, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HlsSliderHue"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            Maximum="360"
                                            SmallChange="1"
                                            LargeChange="1"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Hue, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HlsSliderLuminance"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Luminance, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HlsSliderSaturation"
                                            Grid.Row="2"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Saturation, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                </Grid>
                                <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" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="S" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="V" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Hue, Mode=TwoWay, FallbackValue=0}"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}°"
                                            Mask="#3°"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Saturation, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="2"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Value, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HsvSliderHue"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            Maximum="360"
                                            SmallChange="1"
                                            LargeChange="1"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Hue, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HsvSliderSaturation"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Saturation, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HsvSliderValue"
                                            Grid.Row="2"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Value, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                </Grid>
                                <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" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="M" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="Y" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBlock Text="K" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Cyan, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Magenta, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="2"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Yellow, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="4 1 5 1"
                                            Height="22"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="3"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Key, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Height="22"
                                            Margin="4 1 5 1"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="CmykSliderCyan"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Cyan, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="CmykSliderMagenta"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Magenta, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="CmykSliderYellow"
                                            Grid.Row="2"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Yellow, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="CmykSliderKey"
                                            Grid.Row="3"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Key, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                </Grid>
                                <Grid Grid.Row="2" Visibility="{TemplateBinding AlphaSettingsVisibility}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="10"/>
                                        <ColumnDefinition Width="58"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="A" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.SelectedColorViewModel.Alpha, Mode=TwoWay, FallbackValue=0}"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            Mask="p3"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="5 1"
                                            Height="22"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="SliderAlpha"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.SelectedColorViewModel.Alpha, Mode=TwoWay}"
                                            ThumbStyle="{StaticResource ColorEditorThumbStyle}"/>
                                </Grid>
                                <Grid Grid.Row="3">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="15"/>
                                        <ColumnDefinition Width="70"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="#" Grid.Column="0" VerticalAlignment="Center" FontSize="12"/>
                                    <TextBox
                                            Grid.Column="1"
                                            colorEditorHelpers:TextBoxHelper.UpdateTextBindingOnKeyPress="True"
                                            Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hex.Value, Mode=TwoWay}"
                                            Margin="0 3 0 0"/>
                                </Grid>
                            </Grid>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style BasedOn="{StaticResource PadStyle}" TargetType="pad:Pad"/>
    <Style TargetType="controls:RadColorEditor" BasedOn="{StaticResource RadColorEditorStyle}"/>
    <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">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver"/>
                                <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">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionChrome" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </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>
    <Style TargetType="calendar:CalendarButton" BasedOn="{StaticResource CalendarButtonStyle}"/>
    <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>
    <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">
                            <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, RelativeSource={RelativeSource TemplatedParent}, 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, RelativeSource={RelativeSource TemplatedParent}, 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, RelativeSource={RelativeSource TemplatedParent}, 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, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}"/>
                            <Rectangle x:Name="VerticalBackground"
                                    Grid.RowSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalBackgroundZIndex}"
                                    Fill="{StaticResource CalendarWeekHeaderVerticalBackground}"
                                    Margin="{StaticResource CalendarWeekHeaderVerticalBackgroundMargin}"
                                    Visibility="{Binding Path=HideColumn, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}"/>
                            <Rectangle x:Name="HorizontalBackground"
                                    Grid.ColumnSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalBackgroundZIndex}"
                                    Fill="{StaticResource CalendarWeekHeaderHorizontalBackground}"
                                    Margin="{StaticResource CalendarWeekHeaderHorizontalBackgroundMargin}"
                                    Visibility="{Binding Path=HideRow, RelativeSource={RelativeSource TemplatedParent}, 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>
    <Style TargetType="calendar:CalendarView" BasedOn="{StaticResource MonthViewStyle}"/>
    <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>
    <Style x:Key="MoveLeftButtonStyle" TargetType="RepeatButton">
        <Setter Property="Width" Value="22"/>
        <Setter Property="Height" Value="22"/>
        <Setter Property="Margin" Value="3"/>
        <Setter Property="IsTabStop" Value="False"/>
        <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>
    <Style x:Key="MoveRightButtonStyle" TargetType="RepeatButton">
        <Setter Property="Width" Value="22"/>
        <Setter Property="Height" Value="22"/>
        <Setter Property="Margin" Value="3"/>
        <Setter Property="IsTabStop" Value="False"/>
        <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>
    <Style x:Key="CalendarHeaderButton" TargetType="Button">
        <Setter Property="Height" Value="22"/>
        <Setter Property="Margin" Value="3"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Focusable" Value="False"/>
        <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>
    <Style x:Key="RadCalendarStyle" TargetType="controls: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="SnapsToDevicePixels" Value="True"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="True"/>
        <Setter Property="TabIndex" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls: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="controls:RadCalendar" BasedOn="{StaticResource RadCalendarStyle}"/>
    <Style TargetType="controls: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="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls: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"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </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}"
                                RenderFocused="{TemplateBinding IsFocused}"/>
                        <ContentPresenter x:Name="Content"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Margin="{TemplateBinding Padding}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadClockItem" BasedOn="{StaticResource ClockItemStyle}"/>
    <Style TargetType="controls:RadClock" x:Key="RadClockStyle">
        <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="True"/>
        <Setter Property="TabIndex" Value="1"/>
        <Setter Property="StartTime" Value="0:0:0"/>
        <Setter Property="EndTime" Value="23:59:0"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <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="controls: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="controls:RadClock" BasedOn="{StaticResource RadClockStyle}"/>
    <DataTemplate x:Key="WatermarkTemplate">
        <TextBlock Opacity="1" Text="{Binding}"/>
    </DataTemplate>
    <DataTemplate x:Key="TooltipTemplate">
        <Border Margin="2" CornerRadius="3">
            <Border CornerRadius="2" Background="{StaticResource TooltipBackground}" BorderBrush="{x:Null}" BorderThickness="{StaticResource Tooltip_OuterBorderThickness}" Margin="-3">
                <Border CornerRadius="1" BorderBrush="{StaticResource Tooltip_OuterBorderBrush}" BorderThickness="{StaticResource Tooltip_OuterBorderThickness}">
                    <ContentControl Foreground="{StaticResource TooltipForeground}" Margin="5 2" Content="{Binding}"/>
                </Border>
            </Border>
        </Border>
    </DataTemplate>
    <Style x:Key="CloseButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="TabIndex" Value="2"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Grid>
                        <telerikChromes:ButtonChrome RenderNormal="False" RenderFocused="{TemplateBinding IsFocused}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}"/>
                        <ContentPresenter Margin="{TemplateBinding Padding}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls: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.ControlTabNavigation" Value="Cycle"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <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="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls: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>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.150" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <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>False</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="2"
                                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"
                                controls:DateTimePickerExtensions.FocusContentOnOpen="True"
                                Focusable="False">
                            <telerik:RadDropDownButton.DropDownContent>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <controls: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}"
                                            BlackoutDates="{Binding BlackoutDates, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            SelectableDateEnd="{Binding SelectableDateEnd, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"/>
                                    <controls: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}"
                                            SelectedItem="{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>
    <Style TargetType="controls:RadDateTimePicker" BasedOn="{StaticResource RadDateTimePickerStyle}"/>
    <Style TargetType="controls:RadDatePicker" BasedOn="{StaticResource RadDateTimePickerStyle}">
        <Setter Property="InputMode" Value="DatePicker"/>
    </Style>
    <Style TargetType="controls:RadTimePicker" BasedOn="{StaticResource RadDateTimePickerStyle}">
        <Setter Property="InputMode" Value="TimePicker"/>
    </Style>
    <Style x:Key="RadRatingStyle" TargetType="controls:RadRating">
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="Background" Value="{StaticResource Rating_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource Rating_BorderBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <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="controls: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}"/>
                        <Rectangle x:Name="FocusVisualElement"
                                IsHitTestVisible="false"
                                Visibility="Collapsed"
                                StrokeThickness="1"
                                Stroke="{StaticResource FocusBrushBlack}"
                                StrokeDashArray="1 2"
                                RadiusX="1"
                                RadiusY="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRatingItemStyle" TargetType="controls:RadRatingItem">
        <Setter Property="Background" Value="{StaticResource RatingItem_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RatingItem_BorderBrush}"/>
        <Setter Property="BorderThickness" Value="0.6"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls: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="SelectedRatingItem" Storyboard.TargetProperty="Opacity"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="SelectedUnHoveredRatingItem" Storyboard.TargetProperty="Opacity"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledRatingItem" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledRatingItemBackground" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <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>
                        <Grid x:Name="itemGrid" Margin="{TemplateBinding Padding}" Background="Transparent">
                            <Path x:Name="NormalRatingItem"
                                    Fill="{TemplateBinding Background}"
                                    Stretch="Uniform"
                                    HorizontalAlignment="Center"
                                    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"
                                    Stroke="{TemplateBinding BorderBrush}"
                                    StrokeLineJoin="Round"
                                    VerticalAlignment="Stretch"
                                    StrokeThickness="{TemplateBinding BorderThickness}"
                                    Opacity="1"/>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding RatioVisible}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                                <Path x:Name="SelectedRatingItem"
                                        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"
                                        Stretch="Uniform"
                                        StrokeThickness="{TemplateBinding BorderThickness}"
                                        StrokeLineJoin="Round"
                                        Opacity="1"
                                        Fill="{StaticResource RatingItem_SelectedBackground}"
                                        Stroke="{StaticResource RatingItem_SelectedBorder}"/>
                            </telerikRating:LinearClipper>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding RatioVisible}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                                <Path x:Name="MouseOverRatingItem"
                                        Stretch="Uniform"
                                        StrokeThickness="{TemplateBinding BorderThickness}"
                                        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_MouseOverBackground}"
                                        Stroke="{StaticResource RatingItem_MouseOverBorder}"/>
                            </telerikRating:LinearClipper>
                            <Path x:Name="DisabledRatingItemBackground"
                                    Stretch="Uniform"
                                    HorizontalAlignment="Center"
                                    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"
                                    StrokeThickness="{TemplateBinding BorderThickness}"
                                    Fill="{StaticResource ControlBackground_Disabled}"
                                    Stroke="{StaticResource ControlOuterBorder_Disabled}"/>
                            <telerikRating:LinearClipper x:Name="DisabledRatingItem" HorizontalContentAlignment="Center" RatioVisible="{TemplateBinding RatioVisible}" ExpandDirection="Right" Opacity="0">
                                <Path
                                        Stretch="Uniform"
                                        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}"
                                        Stroke="{x:Null}"/>
                            </telerikRating:LinearClipper>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding ValueRatio}" ExpandDirection="Right" HorizontalContentAlignment="Center">
                                <Path x:Name="SelectedUnHoveredRatingItem"
                                        Stretch="Uniform"
                                        StrokeThickness="{TemplateBinding BorderThickness}"
                                        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}"
                                        Stroke="{StaticResource RatingItem_SelectedBorder}"/>
                            </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="controls:RadRating" BasedOn="{StaticResource RadRatingStyle}"/>
    <Style TargetType="controls:RadRatingItem" BasedOn="{StaticResource RadRatingItemStyle}"/>
    <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 x:Name="PART_ContentHost"
                            BorderThickness="0"
                            Background="Transparent"
                            BorderBrush="Transparent"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            ScrollViewer.VerticalScrollBarVisibility="Disabled"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            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="controls: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.ColumnSpan="2"
                                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,-1,5"
                                Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsMemoryUpdated, Converter={StaticResource BooleanToVisibilityConverter}}"
                                VerticalAlignment="Center"/>
                        <TextBox x:Name="HistoryTextBox"
                                HorizontalAlignment="Right"
                                Foreground="{TemplateBinding Foreground}"
                                FontSize="12"
                                Grid.Column="1"
                                Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=History, Mode=OneWay}"
                                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>
                    <telerik:RadButton x:Name="Mc_Button"
                            Content="MC"
                            Grid.Column="0"
                            Background="{StaticResource MemoryButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.MemoryClear}"/>
                    <telerik:RadButton x:Name="Mr_Button"
                            Content="MR"
                            Grid.Column="1"
                            Background="{StaticResource MemoryButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.MemoryRecall}"/>
                    <telerik:RadButton x:Name="Ms_Button"
                            Content="MS"
                            Grid.Column="2"
                            Background="{StaticResource MemoryButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.MemoryStore}"/>
                    <telerik:RadButton x:Name="Mplus_Button"
                            Content="M+"
                            Grid.Column="3"
                            Background="{StaticResource MemoryButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.MemoryPlus}"/>
                    <telerik:RadButton x:Name="Mminus_Button"
                            Content="M-"
                            Grid.Column="4"
                            Background="{StaticResource MemoryButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.MemoryMinus}"/>
                    <telerik:RadButton x:Name="Delete_Button"
                            Grid.Row="1"
                            Grid.Column="0"
                            Content="←"
                            Background="{StaticResource OperatorsButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.Delete}"/>
                    <telerik:RadButton x:Name="ClearInput_Button"
                            Grid.Row="1"
                            Grid.Column="1"
                            Content="CE"
                            Background="{StaticResource OperatorsButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.ClearInput}"/>
                    <telerik:RadButton x:Name="ClearEverything_Button"
                            Grid.Row="1"
                            Grid.Column="2"
                            Content="C"
                            Background="{StaticResource OperatorsButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.ClearEverything}"/>
                    <telerik:RadButton x:Name="Negate_Button"
                            Grid.Row="1"
                            Grid.Column="3"
                            Content="±"
                            Background="{StaticResource OperatorsButton_Background}"
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Negate}"
                            Command="{x:Static controls:RadCalculatorCommands.ExecuteUnaryOperation}"/>
                    <telerik:RadButton x:Name="SquareRoot_Button"
                            Grid.Row="1"
                            Grid.Column="4"
                            Content="√"
                            Background="{StaticResource OperatorsButton_Background}"
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.SquareRoot}"
                            Command="{x:Static controls:RadCalculatorCommands.ExecuteUnaryOperation}"/>
                    <telerik:RadButton x:Name="input7_Button" Grid.Row="2" Content="7" FontWeight="Bold" CommandParameter="7" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="input8_Button" Grid.Row="2" Grid.Column="1" Content="8" FontWeight="Bold" CommandParameter="8" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="input9_Button" Grid.Row="2" Grid.Column="2" Content="9" FontWeight="Bold" CommandParameter="9" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="Divide_Button"
                            Grid.Row="2"
                            Grid.Column="3"
                            Content="/"
                            Background="{StaticResource OperatorsButton_Background}"
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Divide}"
                            Command="{x:Static controls:RadCalculatorCommands.AddPendingBinaryOperation}"/>
                    <telerik:RadButton x:Name="Percent_Button"
                            Grid.Row="2"
                            Grid.Column="4"
                            Content="%"
                            Background="{StaticResource OperatorsButton_Background}"
                            Command="{x:Static controls:RadCalculatorCommands.ExecutePercentOperation}"/>
                    <telerik:RadButton x:Name="input4_Button" Grid.Row="3" Content="4" FontWeight="Bold" CommandParameter="4" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="input5_Button" Grid.Row="3" Grid.Column="1" Content="5" FontWeight="Bold" CommandParameter="5" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="input6_Button" Grid.Row="3" Grid.Column="2" Content="6" FontWeight="Bold" CommandParameter="6" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="Multiply_Button"
                            Grid.Row="3"
                            Grid.Column="3"
                            Content="*"
                            Background="{StaticResource OperatorsButton_Background}"
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Multiply}"
                            Command="{x:Static controls:RadCalculatorCommands.AddPendingBinaryOperation}"/>
                    <telerik:RadButton x:Name="Reciprocal_Button"
                            Grid.Row="3"
                            Grid.Column="4"
                            Content="1/x"
                            Background="{StaticResource OperatorsButton_Background}"
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Reciprocal}"
                            Command="{x:Static controls:RadCalculatorCommands.ExecuteUnaryOperation}"/>
                    <telerik:RadButton x:Name="input1_Button" Grid.Row="4" Content="1" FontWeight="Bold" CommandParameter="1" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="input2_Button" Grid.Row="4" Grid.Column="1" Content="2" FontWeight="Bold" CommandParameter="2" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="input3_Button" Grid.Row="4" Grid.Column="2" Content="3" FontWeight="Bold" CommandParameter="3" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="Substract_Button"
                            Grid.Row="4"
                            Grid.Column="3"
                            Content="-"
                            Background="{StaticResource OperatorsButton_Background}"
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Substract}"
                            Command="{x:Static controls:RadCalculatorCommands.AddPendingBinaryOperation}"/>
                    <telerik:RadButton x:Name="input0_Button"
                            Grid.Row="5"
                            Grid.ColumnSpan="2"
                            MinHeight="25"
                            MinWidth="75"
                            Content="0"
                            FontWeight="Bold"
                            CommandParameter="0"
                            Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="FloatingPoint_Button"
                            Grid.Row="5"
                            Grid.Column="2"
                            Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=DecimalSeparator}"
                            FontWeight="Bold"
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=DecimalSeparator}"
                            Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"/>
                    <telerik:RadButton x:Name="Add_Button"
                            Grid.Row="5"
                            Grid.Column="3"
                            Content="+"
                            Background="{StaticResource OperatorsButton_Background}"
                            CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Add}"
                            Command="{x:Static controls:RadCalculatorCommands.AddPendingBinaryOperation}"/>
                    <telerik:RadButton x:Name="Equals_Button"
                            Grid.Row="4"
                            Grid.Column="4"
                            Grid.RowSpan="2"
                            MinWidth="35"
                            Content="="
                            MinHeight="56"
                            Command="{x:Static controls:RadCalculatorCommands.ExecuteBinaryOperation}"/>
                </Grid>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="RadCalculatorStyle" TargetType="controls: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"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style TargetType="controls:RadCalculator" BasedOn="{StaticResource RadCalculatorStyle}"/>
    <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 x:Name="PART_ContentHost"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            BorderBrush="Transparent"
                            BorderThickness="0"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            ScrollViewer.VerticalScrollBarVisibility="Disabled"
                            Margin="1"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadCalculatorPickerTemplate" TargetType="controls: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>
                        <controls:RadCalculator x:Name="PART_Calculator"
                                Margin="0,1,0,0"
                                MemoryButtonsVisibility="{TemplateBinding MemoryButtonsVisibility}"
                                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" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" 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="controls: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="controls:RadCalculatorPicker" BasedOn="{StaticResource RadCalculatorPickerStyle}"/>
    <telerikMaskedInput:HorizontalContentAlignmentToTextAlignmentConverter x:Key="conv"/>
    <telerik1:BooleanToVisibilityConverter x:Key="boolToVisConverter"/>
    <Style x:Key="MaskedInputTextBoxStyle" TargetType="telerikMaskedInput:PreviewInputTextBox">
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <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="MaskedInputClearButtonTemplate" TargetType="telerik1:RadButton">
        <Border x:Name="ButtonBorder" BorderBrush="White" BorderThickness="1" CornerRadius="15">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF8F2121" Offset="1"/>
                    <GradientStop Color="#FFEB4545"/>
                </LinearGradientBrush>
            </Border.Background>
            <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>
            <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="MaskedInputClearButtonStyle" TargetType="telerik1:RadButton">
        <Setter Property="Template" Value="{StaticResource MaskedInputClearButtonTemplate}"/>
        <Setter Property="Width" Value="19"/>
        <Setter Property="Height" Value="19"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Margin" Value="0 0 3 0"/>
        <Setter Property="Cursor" Value="Hand"/>
    </Style>
    <Style TargetType="controls:RadMaskedInputBase" x:Key="RadMaskedInputBaseStyle">
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="Background" Value="{StaticResource TextBoxBackground}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="Padding" Value="3 2"/>
        <Setter Property="TextBoxStyle" Value="{StaticResource MaskedInputTextBoxStyle}"/>
        <Setter Property="ClearButtonStyle" Value="{StaticResource MaskedInputClearButtonStyle}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="IsReadOnly" Value="False"/>
        <Setter Property="TextMode" Value="MaskedText"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadMaskedInputBase">
                    <Grid UseLayoutRounding="True" SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridContainer" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxBackground_ReadOnly}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisplayText" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Disabled}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForeground_Disabled}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisplayTextContent" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <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}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                                SnapsToDevicePixels="True">
                            <Grid x:Name="GridContainer">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <telerikMaskedInput:PreviewInputTextBox x:Name="EditorSite"
                                        TabIndex="{TemplateBinding TabIndex}"
                                        AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                                        Cursor="{TemplateBinding Cursor}"
                                        AcceptsReturn="{TemplateBinding AcceptsReturn}"
                                        IsEnabled="{TemplateBinding IsEnabled}"
                                        Background="{TemplateBinding Background}"
                                        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">
                                    <telerikMaskedInput:PreviewInputTextBox x:Name="DisplayText"
                                            AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                                            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}"
                                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            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"
                                            IsTabStop="False"
                                            Content="{TemplateBinding EmptyContent}"
                                            ContentTemplate="{TemplateBinding EmptyContentTemplate}"
                                            Foreground="{TemplateBinding Foreground}"
                                            Margin="{TemplateBinding Padding}"
                                            FontStyle="Italic"
                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                </Border>
                                <telerik1:RadButton x:Name="ClearButton"
                                        Command="{TemplateBinding ClearCommand}"
                                        IsTabStop="False"
                                        Style="{TemplateBinding ClearButtonStyle}"
                                        Opacity="0"
                                        Grid.Column="1"
                                        Visibility="{Binding Path=IsClearButtonVisible, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource boolToVisConverter}}"/>
                            </Grid>
                        </Border>
                        <Border x:Name="FocusedVisual"
                                Visibility="Collapsed"
                                BorderThickness="1"
                                Background="{x:Null}"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                        <Border x:Name="DisabledVisual"
                                Visibility="Collapsed"
                                BorderThickness="1"
                                BorderBrush="{StaticResource ControlOuterBorder_Disabled}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls: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="controls: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="controls: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="controls: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="controls:RadMaskedNumericInput" BasedOn="{StaticResource RadMaskedNumericInputStyle}"/>
    <Style TargetType="controls:RadMaskedCurrencyInput" BasedOn="{StaticResource RadMaskedCurrencyInputStyle}"/>
    <Style TargetType="controls:RadMaskedDateTimeInput" BasedOn="{StaticResource RadMaskedDateTimeInputStyle}"/>
    <Style TargetType="controls:RadMaskedTextInput" BasedOn="{StaticResource RadMaskedTextInputStyle}"/>
    <Style x:Key="RadAutoCompleteBoxItemStyle" TargetType="controls:RadAutoCompleteBoxItem">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="3 3 0 0"/>
        <Setter Property="Padding" Value="2 0"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadAutoCompleteBoxItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0.6"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                            <StackPanel Orientation="Horizontal">
                                <ContentPresenter x:Name="contentPresenter"
                                        Margin="{TemplateBinding Padding}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <telerik:RadButton x:Name="RemoveItemButton"
                                        Margin="4 0"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Center"
                                        CornerRadius="0"
                                        CommandParameter="{Binding}"
                                        Foreground="{TemplateBinding Foreground}"
                                        Cursor="Arrow"
                                        IsTabStop="False"
                                        Command="{x:Static telerik:RadAutoCompleteBoxCommands.RemoveItem}"
                                        Width="13"
                                        Height="13"
                                        Focusable="False">
                                    <Path Data="M0,0 L5,5 M5,0 L0,5" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="{StaticResource ButtonIconForeground_Normal}"/>
                                </telerik:RadButton>
                            </StackPanel>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadAutoCompleteTextBoxStyle" TargetType="telerik:RadWatermarkTextBox">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="3 3 0 0"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadWatermarkTextBox">
                    <Grid x:Name="RootElement" Cursor="IBeam">
                        <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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                        <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_ContentHost"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="WatermarkStates">
                                <VisualState x:Name="WatermarkHidden">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="WatermarkVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="WatermarkVisible"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Opacity="1"/>
                        <Border x:Name="MouseOverVisual"
                                Grid.RowSpan="2"
                                Grid.ColumnSpan="2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                IsHitTestVisible="False"
                                Opacity="0"
                                Visibility="Collapsed"/>
                        <Border x:Name="DisabledVisualElement"
                                BorderBrush="{StaticResource ControlOuterBorder_Disabled}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                IsHitTestVisible="False"
                                Opacity="0"/>
                        <ScrollViewer
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                BorderThickness="0"
                                VerticalScrollBarVisibility="Disabled"
                                HorizontalScrollBarVisibility="Disabled"
                                IsTabStop="False"
                                Padding="{TemplateBinding Padding}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                x:Name="PART_ContentHost"/>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                IsHitTestVisible="False"
                                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>
                        <ContentControl x:Name="WatermarkVisualElement"
                                IsTabStop="False"
                                FontStyle="Italic"
                                Opacity="0.5"
                                Content="{TemplateBinding WatermarkContent}"
                                ContentTemplate="{TemplateBinding WatermarkTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsHitTestVisible="False"
                                Margin="{TemplateBinding Padding}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadAutoCompleteBoxTemplate" TargetType="controls:RadAutoCompleteBox">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="0.6"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"/>
            <Border x:Name="MouseOverVisual"
                    BorderBrush="{StaticResource ControlOuterBorder_MouseOver}"
                    CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"/>
            <Border x:Name="FocusVisual"
                    Opacity="0"
                    IsHitTestVisible="False"
                    CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{StaticResource ControlOuterBorder_Focused}">
                <Border BorderBrush="{StaticResource ControlInnerBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="DisabledVisualElement"
                    BorderBrush="{StaticResource ControlOuterBorder_Disabled}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{StaticResource ControlBackground_Disabled}"
                    CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                    IsHitTestVisible="False"
                    Opacity="0"/>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Height="{TemplateBinding Height}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    VerticalContentAlignment="Center"
                    BorderThickness="0"
                    Background="Transparent"
                    Padding="0"
                    IsTabStop="False"
                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                    Margin="{TemplateBinding BorderThickness}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                <controls:AutoCompleteBoxesItemsControl
                        DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
                        BoxesItemTemplate="{TemplateBinding BoxesItemTemplate}"
                        x:Name="PART_Boxes"
                        IsTabStop="False"
                        Foreground="{TemplateBinding Foreground}"
                        Margin="{TemplateBinding Padding}">
                    <controls:AutoCompleteBoxesItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <controls:AutoCompleteBoxesWrapPanel Width="{Binding ActualWidth, ElementName=WatermarkTextBox}"/>
                        </ItemsPanelTemplate>
                    </controls:AutoCompleteBoxesItemsControl.ItemsPanel>
                </controls:AutoCompleteBoxesItemsControl>
            </ScrollViewer>
            <Popup x:Name="PART_Popup">
                <Grid x:Name="PopupRoot">
                    <telerik:RadListBox x:Name="PART_ListBox"
                            ItemsSource="{TemplateBinding FilteredItems}"
                            ItemTemplate="{TemplateBinding DropDownItemTemplate}"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadAutoCompleteBoxStyle" TargetType="controls:RadAutoCompleteBox">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="TextBoxStyle" Value="{StaticResource RadAutoCompleteTextBoxStyle}"/>
        <Setter Property="Template" Value="{StaticResource RadAutoCompleteBoxTemplate}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="Background" Value="{StaticResource TextBoxBackground}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0 0 3 3"/>
        <Setter Property="Cursor" Value="IBeam"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
    </Style>
    <Style TargetType="controls:RadAutoCompleteBoxItem" BasedOn="{StaticResource RadAutoCompleteBoxItemStyle}"/>
    <Style TargetType="controls:RadAutoCompleteBox" BasedOn="{StaticResource RadAutoCompleteBoxStyle}"/>
</ResourceDictionary>
