<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
        xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
        xmlns:colorPaletteConverters="clr-namespace:Telerik.Windows.Controls.ColorPicker.Converters;assembly=Telerik.Windows.Controls.Input"
        xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:navigation="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:telerikControlsRTBUIStatusBar="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI.StatusBar;assembly=Telerik.Windows.Controls.RichTextBoxUI"
        xmlns:telerikControlsRTBUI="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI;assembly=Telerik.Windows.Controls.RichTextBoxUI"
        xmlns:telerikColorPickers="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI.ColorPickers;assembly=Telerik.Windows.Controls.RichTextBoxUI"
        xmlns:telerikDialogs="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI.Dialogs;assembly=Telerik.Windows.Controls.RichTextBoxUI"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:telerikRibbonView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonView"
        xmlns:telerikRibbonViewPrimitives="clr-namespace:Telerik.Windows.Controls.RibbonView.Primitives;assembly=Telerik.Windows.Controls.RibbonView"
        xmlns:telerikKeyTips="clr-namespace:Telerik.Windows.Controls.RibbonView.KeyTips;assembly=Telerik.Windows.Controls.RibbonView"
        xmlns:telerikToolBar="clr-namespace:Telerik.Windows.Controls.ToolBar;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:sectionColumnsUI="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI.Dialogs.SectionColumns;assembly=Telerik.Windows.Controls.RichTextBoxUI">
    <telerik1:ColorToBrushConverter x:Key="converter"/>
    <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
    <SolidColorBrush x:Key="SliderThumb_OuterBorder_Normal" Color="#FF898C95"/>
    <CornerRadius x:Key="SliderHandOuterBorder_CornerRadius">2</CornerRadius>
    <CornerRadius x:Key="SliderHandInnerBorder_CornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="SliderHandOuterBorder_Normal" Color="#00FFFFFF"/>
    <SolidColorBrush x:Key="SliderHandInnerBorder_Normal" Color="#00FFFFFF"/>
    <SolidColorBrush x:Key="SliderHandBackground_Normal" Color="#00FFFFFF"/>
    <SolidColorBrush x:Key="SliderOuterBorder_Focused" Color="#FF2C628B"/>
    <SolidColorBrush x:Key="SliderBackground_Tick" Color="#FF000000"/>
    <SolidColorBrush x:Key="SliderBackgroundTrack" Color="#FFE7EAEA"/>
    <SolidColorBrush x:Key="SliderOuterBorderTrack" Color="#FF898C95"/>
    <SolidColorBrush x:Key="SliderInnerBorderTrack" Color="#00FFFFFF"/>
    <CornerRadius x:Key="SliderOuterBorderTrack_CornerRadius">0</CornerRadius>
    <CornerRadius x:Key="SliderInnerBorderTrack_CornerRadius">0</CornerRadius>
    <Thickness x:Key="SliderOuterBorderTrack_BorderThickness">1</Thickness>
    <Thickness x:Key="SliderInnerBorderTrack_BorderThickness">0</Thickness>
    <Thickness x:Key="SliderRangeMiddleThumb_Margin">0</Thickness>
    <LinearGradientBrush x:Key="SliderRangeMiddleThumb_Background" EndPoint="0.069,0.931" StartPoint="0.069,0.074">
        <GradientStop Color="#FF8ACEE4" Offset="0.655"/>
        <GradientStop Color="#FF9AE7FE" Offset="0.02"/>
        <GradientStop Color="#FF2F58CD" Offset="0.281"/>
        <GradientStop Color="#FF3E69E2" Offset="0.65"/>
        <GradientStop Color="#FF9AE7FE" Offset="0.28"/>
        <GradientStop Color="#FF8ACEE4" Offset="0.996"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SliderRangeMiddleThumb_Background_MouseOver" EndPoint="0.069,0.931" StartPoint="0.069,0.074">
        <GradientStop Color="#FF739DC3" Offset="0.655"/>
        <GradientStop Color="#FFAAD6FE" Offset="0.02"/>
        <GradientStop Color="#FF0A309B" Offset="0.295"/>
        <GradientStop Color="#FF0D5DC9" Offset="0.647"/>
        <GradientStop Color="#FFAAD6FE" Offset="0.28"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SliderRangeMiddleThumb_Background_Disabled" EndPoint="0.069,0.931" StartPoint="0.069,0.074">
        <GradientStop Color="#FFD0F1FA" Offset="0.655"/>
        <GradientStop Color="#FFDEF7FE" Offset="0.02"/>
        <GradientStop Color="#FF849CE2" Offset="0.295"/>
        <GradientStop Color="#FF849CE2" Offset="0.65"/>
        <GradientStop Color="#FFD0F1FA" Offset="0.28"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="SliderRangeMiddleThumb_Focused" Color="#FF2C628B"/>
    <SolidColorBrush x:Key="BorderLineOuterColor" Color="#26000000"/>
    <SolidColorBrush x:Key="BorderLineInnerColor" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="RibbonButtonDropDownArrowBorder" Color="#EFF6FC"/>
    <SolidColorBrush x:Key="RibbonButtonDropDownArrow" Color="#7a7b7d"/>
    <SolidColorBrush x:Key="DropDownPopupBackgroundBrush" Color="#FAFAFA"/>
    <SolidColorBrush x:Key="DropDownPopupBorderBrush" Color="#868686"/>
    <CornerRadius x:Key="SplitButton_LeftPartCornerRadius">2 0 0 2</CornerRadius>
    <CornerRadius x:Key="SplitButton_RightPartCornerRadius">0 2 2 0</CornerRadius>
    <CornerRadius x:Key="SplitButton_TopPartCornerRadius">2 2 0 0</CornerRadius>
    <CornerRadius x:Key="SplitButton_BottomPartCornerRadius">0 0 2 2</CornerRadius>
    <CornerRadius x:Key="SplitButton_SpanCornerRadius">2</CornerRadius>
    <CornerRadius x:Key="SplitButton_SpanInnerCornerRadius">1</CornerRadius>
    <CornerRadius x:Key="ControlOuterBorder_CornerRadius">2</CornerRadius>
    <CornerRadius x:Key="ControlInnerBorder_CornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="ControlOuterBorder" Color="#FFB0B0B0"/>
    <SolidColorBrush x:Key="ControlBackground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ControlElement_Disabled" Color="#FF6E6E6E"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FFA9A9A9"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Disabled" Color="#FFF8F8F8"/>
    <LinearGradientBrush x:Key="ControlBackground_Disabled" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF7F7F7" Offset="0.004"/>
        <GradientStop Color="#FFE3E3E3" Offset="1"/>
        <GradientStop Color="#FFF3F3F3" Offset="0.5"/>
        <GradientStop Color="#FFEAEAEA" Offset="0.5"/>
    </LinearGradientBrush>
    <sys:Double x:Key="ControlElement_Height">4</sys:Double>
    <sys:Double x:Key="ControlElement_Width">7</sys:Double>
    <SolidColorBrush x:Key="ControlElement_Normal" Color="#FF282828"/>
    <SolidColorBrush x:Key="ControlElement_InnerNormal" Color="#00FFFFFF"/>
    <SolidColorBrush x:Key="ControlForeground_Normal" Color="#FF000000"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF898C95"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Normal" Color="#FFFCFCFC"/>
    <LinearGradientBrush x:Key="ControlBackground_Normal" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF2F2F2" Offset="0"/>
        <GradientStop Color="#FFECECEC" Offset="0.5"/>
        <GradientStop Color="#FFDDDDDD" Offset="0.5"/>
        <GradientStop Color="#FFD0D0D0" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlElement_MouseOver" Color="#FF282828"/>
    <SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="ControlInnerBorder_MouseOver" Color="#FFE9F6FD"/>
    <LinearGradientBrush x:Key="ControlBackground_MouseOver" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FFBDE4F9" Offset="0"/>
        <GradientStop Color="#FFB4E0F7" Offset="0.5"/>
        <GradientStop Color="#FF98D1EF" Offset="0.5"/>
        <GradientStop Color="#FF81C3E5" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlElement_Pressed" Color="#FF282828"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Pressed" Color="#FF2C628B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Pressed" Color="#FF9EB0BA"/>
    <LinearGradientBrush x:Key="ControlBackground_Pressed" StartPoint="0.5,1" EndPoint="0.5,0.0">
        <GradientStop Color="#FF6AB6DE" Offset="0"/>
        <GradientStop Color="#FF82C2E4" Offset="0.5"/>
        <GradientStop Color="#FF98D0ED" Offset="0.5"/>
        <GradientStop Color="#FFA9DEFB" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_Highlighted" Color="#B299DEFD"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Highlighted" Color="#FFE7F5FD"/>
    <LinearGradientBrush x:Key="ControlBackground_Highlighted" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FFF1F8FD" Offset="0"/>
        <GradientStop Color="#FFD5EFFC" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_Checked" Color="#FF2C628B"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Checked" Color="#FF9EB0BA"/>
    <LinearGradientBrush x:Key="ControlBackground_Checked" StartPoint="0.5,0" EndPoint="0.5,1">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFA9DEFB" Offset="0"/>
                <GradientStop Color="#FF98D0ED" Offset="0.5"/>
                <GradientStop Color="#FF82C2E4" Offset="0.5"/>
                <GradientStop Color="#FF6AB6DE" Offset="1"/>
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_MouseOverChecked" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="ControlInnerBorder_MouseOverChecked" Color="#FF9EB0BA"/>
    <LinearGradientBrush x:Key="ControlBackground_MouseOverChecked" EndPoint="0.5,0" StartPoint="0.5,1">
        <GradientStop Color="#FF82C3E6" Offset="0"/>
        <GradientStop Color="#FF99D2F0" Offset="0.5"/>
        <GradientStop Color="#FFA9DAF4" Offset="0.5"/>
        <GradientStop Color="#FFBCE5FC" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="#FF99DEFD"/>
    <SolidColorBrush x:Key="ControlBackground_Focused" Color="Transparent"/>
    <SolidColorBrush x:Key="ControlSubItem_OuterBorder_Selected" Color="#FFA6D9F4"/>
    <SolidColorBrush x:Key="ControlSubItem_InnerBorder_Selected" Color="#FFD7F0FC"/>
    <LinearGradientBrush x:Key="ControlSubItem_Background_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFE3F4FC" Offset="0"/>
        <GradientStop Color="#FFA6D9F4" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ButtonIconForeground_Disabled" Color="#FF282828"/>
    <SolidColorBrush x:Key="ButtonIconForeground_Normal" Color="#FF282828"/>
    <SolidColorBrush x:Key="ButtonIconForeground_MouseOver" Color="#FF282828"/>
    <SolidColorBrush x:Key="ButtonIconForeground_Pressed" Color="#FF282828"/>
    <SolidColorBrush x:Key="ButtonIconBackground_Disabled" Color="Transparent"/>
    <SolidColorBrush x:Key="ButtonIconBackground_Normal" Color="Transparent"/>
    <SolidColorBrush x:Key="ButtonIconBackground_MouseOver" Color="Transparent"/>
    <SolidColorBrush x:Key="ButtonIconBackground_Pressed" Color="Transparent"/>
    <SolidColorBrush x:Key="PickerForeground_Normal" Color="#FF000000"/>
    <SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="PickerPopupBackground" Color="White"/>
    <CornerRadius x:Key="ValidationTooltipCornerRadius">1</CornerRadius>
    <CornerRadius x:Key="ValidationTooltip_CornerRadius">2</CornerRadius>
    <SolidColorBrush x:Key="ValidationTooltipForeground" Color="#FFCD2D5B"/>
    <LinearGradientBrush x:Key="ValidationTooltipOuterBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB32D34"/>
        <GradientStop Color="#FFEA8541" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ValidationTooltipInnerBorder" Color="Transparent"/>
    <SolidColorBrush x:Key="ValidationTooltipBackground" Color="White"/>
    <LinearGradientBrush x:Key="ValidationInnerTick" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB42F34" Offset="0"/>
        <GradientStop Color="#FFBF4137" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ValidationOuterTick" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB42F34" Offset="0"/>
        <GradientStop Color="#FFBF4137" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="WindowButtonIconStroke" Color="#FF898C95"/>
    <LinearGradientBrush x:Key="WindowButtonIconFill" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFCFCFC" Offset="0"/>
        <GradientStop Color="#FFD7D7D7" Offset="1"/>
        <GradientStop Color="#FFFDFDFD" Offset="0.51"/>
        <GradientStop Color="#FFE9E9E9" Offset="0.51"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="WindowOuterBorder" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="WindowInnerBorder" Color="#FFF1FAFF"/>
    <SolidColorBrush x:Key="WindowBorderBackground" Color="#FFCCE4FC"/>
    <SolidColorBrush x:Key="WindowBackground" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="WindowHeaderBackground" EndPoint="0.924,-1.969" StartPoint="0.077,1.875">
        <GradientStop Color="#FFCCE4FC" Offset="0"/>
        <GradientStop Color="#FFCCE4FC" Offset="1"/>
        <GradientStop Color="#FFA6D9F4" Offset="0.13"/>
        <GradientStop Color="#FFDDF1FC" Offset="0.14"/>
        <GradientStop Color="#FFA6D9F4" Offset="0.41"/>
        <GradientStop Color="#FFDFF2FD" Offset="0.45"/>
        <GradientStop Color="#FFB0DEF8" Offset="0.7"/>
        <GradientStop Color="#FFA2C2DF" Offset="0.74"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="WindowModalBackground" Color="#333333FF"/>
    <Thickness x:Key="WindowButtonPadding">4 1</Thickness>
    <Thickness x:Key="WindowButtonMargin">1 3 0 2</Thickness>
    <ControlTemplate x:Key="ArrowTemplateEditableCombobox" TargetType="ContentControl">
        <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="7" Height="4" Fill="{TemplateBinding Foreground}" Margin="5 0 6 0"/>
    </ControlTemplate>
    <ControlTemplate x:Key="ArrowTemplateNonEditableCombobox" TargetType="ContentControl">
        <Path x:Name="ForegroundIcon" Data="M0,0 L2,0 1,1 Z" Stretch="Fill" Width="7" Height="4" Fill="{TemplateBinding Foreground}" Margin="5 0 6 0"/>
    </ControlTemplate>
    <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 TargetType="primitives:LayoutTransformControl" x:Key="LayoutTransformControlStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="primitives:LayoutTransformControl">
                    <Grid x:Name="RootVisual" Background="{TemplateBinding Background}">
                        <ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="primitives:LayoutTransformControl" BasedOn="{StaticResource LayoutTransformControlStyle}"/>
    <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="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <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="0">
                                                <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="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="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <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="0">
                                                <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="ContentHost" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>0</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 3 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ContentPlacementAtTop">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>0</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 3</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ContentPlacementAtRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>3 0 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ContentPlacementAtBottom">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 3 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ContentVisibilityStates">
                                <VisualState x:Name="Visible"/>
                                <VisualState x:Name="Collapsed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</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}"/>
                        <Grid Margin="{TemplateBinding Padding}">
                            <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}"/>
                            <Grid x:Name="ContentHost" Grid.Column="1" Grid.Row="2">
                                <ContentPresenter x:Name="Content"
                                        TextBlock.Foreground="{TemplateBinding Foreground}"
                                        Margin="{TemplateBinding ContentMargin}"
                                        Content="{TemplateBinding Content}"
                                        ContentTemplate="{TemplateBinding ContentTemplate}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                        ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                        RecognizesAccessKey="True"/>
                            </Grid>
                        </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="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <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 Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverChecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerCheckedVisual" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="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="0">
                                                <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="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <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 Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverChecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerCheckedVisual" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="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="0">
                                                <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"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <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="0">
                                                <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}"
                                        CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
                                    <ContentControl x:Name="DropDownPopupContent"
                                            Foreground="{TemplateBinding Foreground}"
                                            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="RadSplitButtonToggleButtonStyle" BasedOn="{StaticResource RadToggleButtonStyle}" TargetType="telerik1:RadToggleButton">
        <Setter Property="Foreground" Value="{StaticResource ControlElement_Normal}"/>
        <Setter Property="Padding" Value="0"/>
        <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="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <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 Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverChecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOverChecked}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="InnerCheckedVisual" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="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="0">
                                                <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"
                                Content="{TemplateBinding Content}"
                                Margin="{TemplateBinding Padding}"
                                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="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 RadSplitButtonToggleButtonStyle}"/>
        <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/>
                                </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">
                                                <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="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>
                                    </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="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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropDownButtonAtRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>-1 0 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropDownButtonAtBottom">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 -1 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <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>
                                    </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="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="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Double>0</sys:Double>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.115">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Double>1</sys:Double>
                                                </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}"
                                    FontSize="{TemplateBinding FontSize}"
                                    IsBackgroundVisible="{TemplateBinding IsBackgroundVisible}"
                                    Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                                    IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                    MinHeight="9"
                                    MinWidth="15"
                                    CornerRadius="{StaticResource SplitButton_RightPartCornerRadius}"
                                    Focusable="False">
                                <Grid x:Name="PART_DropDownIndicatorInner"
                                        IsHitTestVisible="False"
                                        HorizontalAlignment="Center"
                                        Canvas.ZIndex="2"
                                        VerticalAlignment="Center"
                                        RenderTransformOrigin="0.5,0.5"
                                        Margin="0 0 0 0">
                                    <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"
                                            Fill="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            Margin="0 1"
                                            Data="M0,0 L2,0 1,1 Z"
                                            Width="{StaticResource ControlElement_Width}"
                                            Height="{StaticResource ControlElement_Height}"
                                            Stretch="Fill"/>
                                </Grid>
                            </telerik1:RadToggleButton>
                        </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" Visibility="{Binding Path=IsPressed, ElementName = DropDownPart, Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
                            <Border x:Name="FocusVisual"
                                    Visibility="{Binding Path=IsPressed, ElementName = ButtonPart, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
                                    Background="{x:Null}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    Opacity="0"
                                    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}"
                                        Background="{StaticResource ControlBackground}"
                                        BorderBrush="{StaticResource ControlOuterBorder}"
                                        CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
                                    <ContentControl x:Name="DropDownPopupContent"
                                            Foreground="{TemplateBinding Foreground}"
                                            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}"/>
    <ControlTemplate TargetType="RepeatButton" x:Key="HandleRepeatButton">
        <Grid x:Name="Root" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_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="Path" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlInnerBorder_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlElement_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                <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 x:Name="NormalBorder"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{StaticResource SliderHandOuterBorder_CornerRadius}">
                <Border BorderThickness="1" BorderBrush="{StaticResource SliderHandInnerBorder_Normal}" CornerRadius="{StaticResource SliderHandInnerBorder_CornerRadius}"/>
            </Border>
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{x:Null}"
                    Background="{x:Null}"
                    CornerRadius="{StaticResource SliderHandOuterBorder_CornerRadius}">
                <Border x:Name="InnerBorder" BorderThickness="1" BorderBrush="{x:Null}" CornerRadius="{StaticResource SliderHandInnerBorder_CornerRadius}"/>
            </Border>
            <Path
                    Fill="{StaticResource ControlElement_Normal}"
                    x:Name="Path"
                    Stretch="Fill"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    RenderTransformOrigin="0.5,0.5"
                    Data="M4,0 L4,6 0,3 z"
                    Width="4"
                    Height="7"/>
            <Border x:Name="FocusVisual"
                    Visibility="Collapsed"
                    BorderThickness="1"
                    BorderBrush="{StaticResource SliderOuterBorder_Focused}"
                    CornerRadius="{StaticResource SliderHandOuterBorder_CornerRadius}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="IncreaseHandleStyle" TargetType="RepeatButton">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Template" Value="{StaticResource HandleRepeatButton}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{StaticResource SliderHandBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource SliderHandOuterBorder_Normal}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="18"/>
        <Setter Property="Height" Value="18"/>
        <Setter Property="Margin" Value="2 0 0 0"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="-1" ScaleY="1"/>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DecreaseHandleStyle" TargetType="RepeatButton">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Template" Value="{StaticResource HandleRepeatButton}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{StaticResource SliderHandBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource SliderHandOuterBorder_Normal}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="18"/>
        <Setter Property="Height" Value="18"/>
        <Setter Property="Margin" Value="0 0 2 0"/>
    </Style>
    <Style TargetType="Thumb" x:Key="ThumbStyle">
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="10"/>
        <Setter Property="Height" Value="18"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource SliderThumb_OuterBorder_Normal}"/>
        <Setter Property="Focusable" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid x:Name="Root">
                        <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_Pressed}"/>
                                        </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>
                                    </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:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0: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" BorderBrush="{x:Null}" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}"/>
                        </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 TargetType="Thumb" x:Key="SelectionMiddleThumbStyle">
        <Setter Property="Height" Value="4"/>
        <Setter Property="Background" Value="{StaticResource SliderRangeMiddleThumb_Background}"/>
        <Setter Property="BorderThickness" Value="{StaticResource SliderRangeMiddleThumb_Margin}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Focusable" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid Background="Transparent" x:Name="Root">
                        <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 SliderRangeMiddleThumb_Background_MouseOver}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="Background" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SliderRangeMiddleThumb_Background_MouseOver}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="Background" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SliderRangeMiddleThumb_Background_Disabled}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                        <Border x:Name="FocusVisual"
                                BorderThickness="0 1"
                                Visibility="Collapsed"
                                BorderBrush="{StaticResource SliderRangeMiddleThumb_Focused}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DataTemplate x:Key="DefaultTicksTemplate">
        <Rectangle Width="1" ToolTipService.ToolTip="{Binding}" Height="5" Fill="{StaticResource SliderBackground_Tick}"/>
    </DataTemplate>
    <Style TargetType="telerik1:RadTickBar" x:Key="RadTickBarStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerik1:TickBarPanel Background="Transparent"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ContentControl" x:Key="TrackStyle">
        <Setter Property="BorderThickness" Value="{StaticResource SliderOuterBorderTrack_BorderThickness}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="Height" Value="6"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Border
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"
                            CornerRadius="{StaticResource SliderOuterBorderTrack_CornerRadius}">
                        <Border CornerRadius="{StaticResource SliderInnerBorderTrack_CornerRadius}" BorderThickness="{StaticResource SliderInnerBorderTrack_BorderThickness}" BorderBrush="{StaticResource SliderInnerBorderTrack}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="RepeatButton" x:Key="LargeHandleStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid Background="Transparent"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadSlider" x:Key="RadSliderStyle">
        <Setter Property="BorderBrush" Value="{StaticResource SliderOuterBorderTrack}"/>
        <Setter Property="Background" Value="{StaticResource SliderBackgroundTrack}"/>
        <Setter Property="TickTemplate" Value="{StaticResource DefaultTicksTemplate}"/>
        <Setter Property="ThumbStyle" Value="{StaticResource ThumbStyle}"/>
        <Setter Property="AlternateThumbStyle" Value="{StaticResource ThumbStyle}"/>
        <Setter Property="SelectionMiddleThumbStyle" Value="{StaticResource SelectionMiddleThumbStyle}"/>
        <Setter Property="TickBarStyle" Value="{StaticResource RadTickBarStyle}"/>
        <Setter Property="TrackStyle" Value="{StaticResource TrackStyle}"/>
        <Setter Property="IncreaseHandleStyle" Value="{StaticResource IncreaseHandleStyle}"/>
        <Setter Property="DecreaseHandleStyle" Value="{StaticResource DecreaseHandleStyle}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadSlider">
                    <primitives:LayoutTransformControl x:Name="layoutControl" RenderTransformOrigin=".5 0">
                        <primitives:LayoutTransformControl.LayoutTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </primitives:LayoutTransformControl.LayoutTransform>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="OrientationStates">
                                <VisualState x:Name="Horizontal">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="layoutControl" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <RotateTransform Angle="0"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Vertical">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="layoutControl" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <RotateTransform Angle="-90"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReversedHorizontal">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="layoutControl" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScaleTransform ScaleX="-1"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomTickBar" Storyboard.TargetProperty="RenderTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScaleTransform ScaleX="-1"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopTickBar" Storyboard.TargetProperty="RenderTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScaleTransform ScaleX="-1"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReversedVertical">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="layoutControl" Storyboard.TargetProperty="LayoutTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleY="-1"/>
                                                        <RotateTransform Angle="90"/>
                                                    </TransformGroup>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomTickBar" Storyboard.TargetProperty="RenderTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleY="-1"/>
                                                        <RotateTransform Angle="-180"/>
                                                    </TransformGroup>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopTickBar" Storyboard.TargetProperty="RenderTransform">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleY="-1"/>
                                                        <RotateTransform Angle="-180"/>
                                                    </TransformGroup>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="TickPlacementStates">
                                <VisualState x:Name="NoneTicks">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopTickBar" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomTickBar" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="TopTicks">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopTickBar" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomTickBar" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BottomTicks">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopTickBar" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomTickBar" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BothTicks">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopTickBar" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BottomTickBar" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="RangeStates">
                                <VisualState x:Name="SingleThumb"/>
                                <VisualState x:Name="RangeThumbs">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RangeThumbsPanel" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SingleThumbHost" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid UseLayoutRounding="True">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <telerik1:RadTickBar x:Name="TopTickBar"
                                    Grid.Column="1"
                                    Grid.ColumnSpan="3"
                                    ItemTemplate="{TemplateBinding TickTemplate}"
                                    ItemsSource="{TemplateBinding ResultTicks}"
                                    ItemTemplateSelector="{TemplateBinding TickTemplateSelector}"
                                    Maximum="{TemplateBinding Maximum}"
                                    Minimum="{TemplateBinding Minimum}"
                                    IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
                                    Style="{TemplateBinding TickBarStyle}"
                                    RenderTransformOrigin="0.5,0.5">
                                <telerik1:RadTickBar.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </telerik1:RadTickBar.RenderTransform>
                            </telerik1:RadTickBar>
                            <ContentControl
                                    Style="{TemplateBinding TrackStyle}"
                                    x:Name="Track"
                                    Grid.Column="1"
                                    Grid.ColumnSpan="3"
                                    Grid.Row="1"
                                    VerticalAlignment="Center"
                                    Background="{TemplateBinding Background}"/>
                            <RepeatButton x:Name="DecreaseButton"
                                    Grid.Row="1"
                                    Delay="{TemplateBinding Delay}"
                                    Interval="{TemplateBinding RepeatInterval}"
                                    Visibility="{TemplateBinding HandlesVisibility}"
                                    Style="{TemplateBinding DecreaseHandleStyle}"/>
                            <RepeatButton x:Name="LargeDecreaseButton"
                                    Grid.Column="1"
                                    Grid.Row="1"
                                    Style="{StaticResource LargeHandleStyle}"
                                    Delay="{TemplateBinding Delay}"
                                    Interval="{TemplateBinding RepeatInterval}"/>
                            <Grid Grid.Row="1" Grid.Column="2">
                                <Thumb x:Name="SingleThumbHost" Style="{TemplateBinding ThumbStyle}" Visibility="{TemplateBinding ThumbVisibility}"/>
                                <StackPanel x:Name="RangeThumbsPanel" Orientation="Horizontal" Visibility="Collapsed">
                                    <Thumb x:Name="RangeStartThumb" Style="{TemplateBinding ThumbStyle}" Visibility="{TemplateBinding ThumbVisibility}"/>
                                    <Thumb x:Name="RangeMiddleThumb" Style="{TemplateBinding SelectionMiddleThumbStyle}"/>
                                    <Thumb x:Name="RangeEndThumb" Style="{TemplateBinding AlternateThumbStyle}" Visibility="{TemplateBinding ThumbVisibility}"/>
                                </StackPanel>
                            </Grid>
                            <RepeatButton x:Name="LargeIncreaseButton"
                                    Grid.Column="3"
                                    Grid.Row="1"
                                    Style="{StaticResource LargeHandleStyle}"
                                    Delay="{TemplateBinding Delay}"
                                    Interval="{TemplateBinding RepeatInterval}"/>
                            <RepeatButton x:Name="IncreaseButton"
                                    Grid.Row="1"
                                    Grid.Column="4"
                                    Delay="{TemplateBinding Delay}"
                                    Interval="{TemplateBinding RepeatInterval}"
                                    Visibility="{TemplateBinding HandlesVisibility}"
                                    RenderTransformOrigin="0.5,0.5"
                                    Style="{TemplateBinding IncreaseHandleStyle}"/>
                            <telerik1:RadTickBar x:Name="BottomTickBar"
                                    Grid.Row="2"
                                    Grid.Column="1"
                                    Grid.ColumnSpan="3"
                                    Maximum="{TemplateBinding Maximum}"
                                    Minimum="{TemplateBinding Minimum}"
                                    ItemsSource="{TemplateBinding ResultTicks}"
                                    ItemTemplate="{TemplateBinding TickTemplate}"
                                    ItemTemplateSelector="{TemplateBinding TickTemplateSelector}"
                                    IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
                                    Style="{TemplateBinding TickBarStyle}"
                                    RenderTransformOrigin="0.5,0.5">
                                <telerik1:RadTickBar.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </telerik1:RadTickBar.RenderTransform>
                            </telerik1:RadTickBar>
                        </Grid>
                    </primitives:LayoutTransformControl>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadTickBar" BasedOn="{StaticResource RadTickBarStyle}"/>
    <Style TargetType="telerik1:RadSlider" BasedOn="{StaticResource RadSliderStyle}"/>
    <SolidColorBrush x:Key="ColorPicker_TitleBackground" Color="#FFE2E7F2"/>
    <SolidColorBrush x:Key="ColorPicker_TitleBorder" Color="#FF84ADC5"/>
    <SolidColorBrush x:Key="ColorPicker_Background" Color="Transparent"/>
    <SolidColorBrush x:Key="ColorPicker_OuterBorder" Color="#FF84ADC5"/>
    <SolidColorBrush x:Key="ColorPicker_InnerBorder" Color="#FFF5F5F5"/>
    <SolidColorBrush x:Key="ColorPicker_Foreground" Color="#FF000000"/>
    <SolidColorBrush x:Key="ColorPaletteViewItem_Border" Color="#FFBFBFBF"/>
    <SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_MouseOver" Color="#FF00AFFF"/>
    <SolidColorBrush x:Key="ColorPaletteViewItem_InnerBorder_MouseOver" Color="#FF92E9F6"/>
    <SolidColorBrush x:Key="ColorPaletteViewItem_OuterBorder_Selected" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="ColorPaletteViewItem_InnerBorder_Selected" Color="#FFE9F6FD"/>
    <CornerRadius x:Key="ColorPicker_HeaderButtonOuterBorder_CornerRadius">2</CornerRadius>
    <CornerRadius x:Key="ColorPicker_HeaderButtonInnerBorder_CornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonBackground" Color="#FFE2E7F2"/>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonBorder" Color="#FF84ADC5"/>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterBorder_MouseOver" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerBorder_MouseOver" Color="#FFE9F6FD"/>
    <LinearGradientBrush x:Key="ColorPicker_HeaderButtonInnerBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF81C3E5" Offset="1"/>
        <GradientStop Color="#FFB4E0F7" Offset="0.5"/>
        <GradientStop Color="#FF98D1EF" Offset="0.5"/>
        <GradientStop Color="#FFBDE4F9" Offset="0"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonOuterColorStroke" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="ColorPicker_HeaderButtonInnerColorStroke" Color="#FFBFBFBF"/>
    <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="telerikInput:RadColorPaletteViewItem">
        <Setter Property="Margin" Value="2 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput: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 BorderThickness="1" BorderBrush="{StaticResource ColorPaletteViewItem_InnerBorder_MouseOver}"/>
                        </Border>
                        <Border x:Name="SelectedVisual"
                                MinHeight="13"
                                MinWidth="13"
                                VerticalAlignment="Stretch"
                                Opacity="0"
                                BorderThickness="1"
                                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="telerikInput: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="telerikInput: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="telerikInput: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="telerikInput: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>
                                <telerikInput: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">
                                    <telerikInput:RadColorPaletteView.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <primitives:RadUniformGrid Background="Transparent" Columns="10"/>
                                        </ItemsPanelTemplate>
                                    </telerikInput:RadColorPaletteView.ItemsPanel>
                                </telerikInput:RadColorPaletteView>
                                <telerikInput: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>
                                <telerikInput: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}">
                                    <telerikInput:RadColorPaletteView.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <primitives:RadUniformGrid Background="Transparent" Columns="10"/>
                                        </ItemsPanelTemplate>
                                    </telerikInput:RadColorPaletteView.ItemsPanel>
                                </telerikInput: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>
                                <telerikInput:RadColorPaletteView
                                        Grid.Row="7"
                                        x:Name="RecentColorsPalette"
                                        Margin="0 0 0 1"
                                        ItemTemplate="{TemplateBinding PaletteItemsTemplate}"
                                        ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                        BorderThickness="0"
                                        Background="{TemplateBinding Background}"
                                        Visibility="Collapsed"
                                        VerticalAlignment="Center"
                                        BorderBrush="Transparent"
                                        MinHeight="14">
                                    <telerikInput:RadColorPaletteView.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <primitives:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                                        </ItemsPanelTemplate>
                                    </telerikInput:RadColorPaletteView.ItemsPanel>
                                </telerikInput: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="telerikInput: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="telerikInput: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>
                                <telerikInput: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="telerikInput:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStyle}"/>
    <Style TargetType="telerikInput:RadColorPaletteView" BasedOn="{StaticResource RadColorPaletteViewStyle}"/>
    <Style TargetType="telerikInput:RadColorSelector" BasedOn="{StaticResource RadColorSelectorStyle}"/>
    <Style TargetType="telerikInput:RadColorPicker" BasedOn="{StaticResource RadColorPickerStyle}"/>
    <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="telerikInput:RadComboBox">
        <Grid x:Name="VisualRoot">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity">
                                <LinearDoubleKeyFrame KeyTime="0:0:0.050" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0.050">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>False</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <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}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{StaticResource PickerBackground_Normal}"/>
            <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="{TemplateBinding ScrollViewer.CanContentScroll}">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="NonEditableComboBox" TargetType="telerikInput:RadComboBox">
        <Grid x:Name="VisualRoot">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.5"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.5"/>
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonChrome" Storyboard.TargetProperty="RenderEnabled">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>False</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <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}"
                            Content="{TemplateBinding SelectionBoxItem}"
                            ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                        <ContentPresenter.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
                            </Style>
                        </ContentPresenter.Resources>
                    </ContentPresenter>
                </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="{TemplateBinding ScrollViewer.CanContentScroll}">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadComboBoxItemStyle" TargetType="telerikInput:RadComboBoxItem">
        <Setter Property="MinHeight" Value="19"/>
        <Setter Property="Margin" Value="0 -1 0 0"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Padding" Value="3 2"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput:RadComboBoxItem">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighlightVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                                            <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.33"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Border x:Name="HighlightVisual"
                                    Visibility="Collapsed"
                                    CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                                    BorderThickness="1"
                                    BorderBrush="{StaticResource ControlOuterBorder_Highlighted}"
                                    Background="{StaticResource ControlBackground_Highlighted}"
                                    AutomationProperties.AutomationId="HighlightVisual">
                                <Border BorderThickness="1" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Highlighted}"/>
                            </Border>
                            <Border x:Name="SelectedVisual"
                                    Opacity="0"
                                    SnapsToDevicePixels="True"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                                    BorderBrush="{StaticResource ControlSubItem_OuterBorder_Selected}">
                                <Border
                                        Background="{StaticResource ControlSubItem_Background_Selected}"
                                        BorderBrush="{StaticResource ControlSubItem_InnerBorder_Selected}"
                                        BorderThickness="1"
                                        CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}"
                                        SnapsToDevicePixels="True"/>
                            </Border>
                            <ContentPresenter x:Name="Content"
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerikInput:RadComboBox}}, Path=AllowMultipleSelection}" Value="True"/>
                                <Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource Mode=Self}}" Value="True"/>
                            </MultiDataTrigger.Conditions>
                            <MultiDataTrigger.Setters>
                                <Setter TargetName="SelectedVisual" Property="Opacity" Value="1"/>
                                <Setter TargetName="HighlightVisual" Property="Opacity" Value="0"/>
                            </MultiDataTrigger.Setters>
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadComboBoxStyle" TargetType="telerikInput:RadComboBox">
        <Setter Property="Template" Value="{StaticResource NonEditableComboBox}"/>
        <Setter Property="EditableTemplate" Value="{StaticResource EditableComboBox}"/>
        <Setter Property="NonEditableTemplate" Value="{StaticResource NonEditableComboBox}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="Padding" Value="4 0"/>
        <Setter Property="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}"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Continue"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    </Style>
    <Style TargetType="telerikInput:RadComboBoxItem" BasedOn="{StaticResource RadComboBoxItemStyle}"/>
    <Style TargetType="telerikInput:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle}"/>
    <DataTemplate x:Key="AlertIconTemplate">
        <Grid Height="44" Width="46">
            <Path
                    Stretch="Fill"
                    Margin="-23 0 0 0"
                    RenderTransformOrigin="0.75 0.5"
                    Data="M24.1,0 C24.9,0.3 25.4,1.4 25.4,1.4 C25.4,1.4 46.1,38.3 46.1,40.9 C46.1,43.4 43.7,43.7 43.7,43.7 L23,43.7 L2.4,43.7 C2.4,43.7 0,43.4 0,40.9 C0,38.3 20.8,1.4 20.8,1.4 C20.8,1.4 21.2,0.3 22,0 z"
                    HorizontalAlignment="Left"
                    Width="46">
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.4 1" StartPoint="0.6 0">
                        <GradientStop Color="#FFFFDA45" Offset="0.3"/>
                        <GradientStop Color="#FFFF9945" Offset="1"/>
                    </LinearGradientBrush>
                </Path.Fill>
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="-1"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path
                    Stretch="Fill"
                    Margin="-23 18 0 0"
                    RenderTransformOrigin="0.75 0.5"
                    Data="M44.9,37.7 C45.7,39.3 46.1,40.5 46.1,40.9 C46.1,43.4 43.7,43.7 43.7,43.7 L23,43.7 L2.4,43.7 C2.4,43.7 0,43.4 0,40.9 C0,39.5 5.8,28.6 11.4,18.3 C11.5,18 44.6,37.1 44.9,37.7 z"
                    HorizontalAlignment="Left"
                    Width="46">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="-1"/>
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.4 1" StartPoint="0.5 0.4">
                        <GradientStop Color="#FFFCB827" Offset="0.7"/>
                        <GradientStop Color="#FFFE9A0A" Offset="0.1"/>
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <Path
                    Stretch="Fill"
                    Margin="-22 1 0 0"
                    RenderTransformOrigin="0.75 0.5"
                    Data="M24.1,0 C24.9,0.3 25.4,1.4 25.4,1.4 C25.4,1.4 46.1,38.3 46.1,40.9 C46.1,43.4 43.7,43.7 43.7,43.7 L23,43.7 L2.4,43.7 C2.4,43.7 0,43.4 0,40.9 C0,38.3 20.8,1.4 20.8,1.4 C20.8,1.4 21.2,0.3 22,0 z"
                    Stroke="#FFFEF065"
                    HorizontalAlignment="Left"
                    Width="44">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="-1"/>
                        <TranslateTransform X="1"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path
                    Stretch="Fill"
                    Height="17"
                    Margin="6 0 6 1"
                    VerticalAlignment="Bottom"
                    Data="M179.6,132.9 L209.1,132.9 C209.1,132.9 207,119.5 194.2,119.5 C182.5,119.5 179.6,132.9 179.6,132.9 z">
                <Path.OpacityMask>
                    <RadialGradientBrush GradientOrigin="0.5 0.9">
                        <GradientStop Color="#A8FFD100" Offset="0.4"/>
                        <GradientStop Color="Transparent" Offset="0.9"/>
                        <GradientStop Color="#A0DCA209" Offset="0.2"/>
                    </RadialGradientBrush>
                </Path.OpacityMask>
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.5 1" StartPoint="0.5 0">
                        <GradientStop Color="#24FEF9BA" Offset="1"/>
                        <GradientStop Color="#BBFBFC18" Offset="0.9"/>
                        <GradientStop Color="#48FED72C" Offset="0.3"/>
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <Path
                    Stretch="Fill"
                    Margin="-23 0 0 0"
                    RenderTransformOrigin="0.75 0.5"
                    Data="M24.1,0 C24.9,0.3 25.4,1.4 25.4,1.4 C25.4,1.4 46.1,38.3 46.1,40.9 C46.1,43.4 43.7,43.7 43.7,43.7 L23,43.7 L2.4,43.7 C2.4,43.7 0,43.4 0,40.9 C0,38.3 20.8,1.4 20.8,1.4 C20.8,1.4 21.2,0.3 22,0 z"
                    HorizontalAlignment="Left"
                    Width="46">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="-1"/>
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Stroke>
                    <LinearGradientBrush EndPoint="0.5 1" StartPoint="0.5 0">
                        <GradientStop Color="#FFF66E04" Offset="0"/>
                        <GradientStop Color="#FFC35602" Offset="1"/>
                    </LinearGradientBrush>
                </Path.Stroke>
            </Path>
            <Path
                    Stretch="Fill"
                    Margin="20 13 0 15"
                    Data="M118.2,79.4 C118.2,79.4 118.8,78.4 119.2,78.4 C119.5,78.3 121.2,78.4 121.2,78.4 C121.2,78.4 121.9,79.1 122,79.2 C122,79.4 122,91.2 122,91.2 L121.1,92.7 L119.1,92.7 L118.2,91.2 z"
                    Fill="White"
                    HorizontalAlignment="Left"
                    Width="5"/>
            <Ellipse Fill="White" Height="6" Margin="19 0 0 5" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="6"/>
        </Grid>
    </DataTemplate>
    <DataTemplate x:Key="ConfirmIconTemplate">
        <Grid Height="44" Width="44">
            <Ellipse Width="44">
                <Ellipse.Fill>
                    <LinearGradientBrush EndPoint="0.7 1" StartPoint="0.3 0">
                        <GradientStop Color="#FF67A1F4" Offset="0.1"/>
                        <GradientStop Color="#FF1660C0" Offset="0.7"/>
                    </LinearGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <Path Stretch="Fill" Margin="2 16 1 0" Data="M289,92.6 C289,92.6 299.3,80.5 329.4,81 C329.8,81 332.6,107.1 308.8,107.1 C296,107.1 289,92.6 289,92.6 z">
                <Path.Fill>
                    <LinearGradientBrush EndPoint="0.6 1" StartPoint="0.4 0">
                        <GradientStop Color="#FF1660C0" Offset="0"/>
                        <GradientStop Color="#FF084EAB" Offset="1"/>
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <Ellipse Stroke="#FF9AC2FA" Margin="1 1 0 0">
                <Ellipse.OpacityMask>
                    <LinearGradientBrush EndPoint="0.5 1" StartPoint="0.5 0">
                        <GradientStop Color="#7C1D99EC" Offset="0"/>
                        <GradientStop Color="#7EAFDDFC" Offset="1"/>
                        <GradientStop Color="#C45EB6F1" Offset="0.4"/>
                    </LinearGradientBrush>
                </Ellipse.OpacityMask>
            </Ellipse>
            <Path
                    Stretch="Fill"
                    Margin="13 6 12 15"
                    Data="M300.1,72.5 L300.2,76.8 C300.2,76.8 303.7,74.2 308.5,75 C312.6,75.7 312.3,80.3 311.2,81.9 C307.6,87.3 306,88 306,89.6 C306,91.5 306,92.9 306,92.9 L311.4,92.9 L311.4,89.7 C311.4,89.7 312.4,89 315.2,85.8 C316.8,83.9 318,81.9 318.4,80.7 C319,79.1 319.7,74.5 315,72.1 C313.4,71.3 311.4,70.4 307.1,70.6 C302.8,70.7 300.1,72.5 300.1,72.5 z"
                    Fill="White"/>
            <Rectangle Fill="White" Height="6" Margin="19 0 19 6" VerticalAlignment="Bottom"/>
            <Ellipse Width="44">
                <Ellipse.Stroke>
                    <LinearGradientBrush EndPoint="0.5 1" StartPoint="0.5 0">
                        <GradientStop Color="#FF2F6FC4" Offset="0"/>
                        <GradientStop Color="#FF084FAB" Offset="1"/>
                    </LinearGradientBrush>
                </Ellipse.Stroke>
            </Ellipse>
        </Grid>
    </DataTemplate>
    <Style x:Key="WindowButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Padding" Value="{StaticResource WindowButtonPadding}"/>
        <Setter Property="Margin" Value="{StaticResource WindowButtonMargin}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>
                        <telerikChromes:ButtonChrome
                                RenderNormal="False"
                                CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                                RenderMouseOver="{TemplateBinding IsMouseOver}"
                                RenderPressed="{TemplateBinding IsPressed}"/>
                        <ContentPresenter Margin="{TemplateBinding Padding}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="WindowResizeThumbStyle" TargetType="Thumb">
        <Setter Property="MinWidth" Value="5"/>
        <Setter Property="MinHeight" Value="5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Rectangle Fill="Transparent"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadWindowTemplate" TargetType="telerikNavigation:RadWindow">
        <Grid x:Name="LayoutRoot">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="Disabled"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DragStates">
                    <VisualState x:Name="NotDragging"/>
                    <VisualState x:Name="Dragging"/>
                    <VisualState x:Name="Resizing"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="WindowStates">
                    <VisualState x:Name="NormalWindow"/>
                    <VisualState x:Name="MaximizedRestricted"/>
                    <VisualState x:Name="Maximized">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowOuterBorder" Storyboard.TargetProperty="CornerRadius">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <CornerRadius>0</CornerRadius>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowInnerBorder" Storyboard.TargetProperty="CornerRadius">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <CornerRadius>0</CornerRadius>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowOuterBorder" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowInnerBorder" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentInnerBorder" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0 1 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentOuterBorder" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0 1 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentOuterBorder" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButtons" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowOuterBorder" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Minimized">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentOuterBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButtons" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="HorizontalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <HorizontalAlignment>Left</HorizontalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Top</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Shadow" CornerRadius="10" BorderBrush="#11000000" BorderThickness="1">
                <Border CornerRadius="9" BorderBrush="#22000000" BorderThickness="1">
                    <Border CornerRadius="8" BorderBrush="#33000000" BorderThickness="1">
                        <Border CornerRadius="7" BorderBrush="#44000000" BorderThickness="0 0 1 1">
                            <Border CornerRadius="6" BorderBrush="#55000000" BorderThickness="0 0 1 1"/>
                        </Border>
                    </Border>
                </Border>
            </Border>
            <Border x:Name="WindowOuterBorder" Margin="3 3 5 5" Grid.RowSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="5">
                <Border x:Name="WindowInnerBorder" BorderBrush="{StaticResource WindowInnerBorder}" BorderThickness="1" CornerRadius="4">
                    <AdornerDecorator>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Rectangle x:Name="HeaderBackgroundVisual" Grid.Row="0" Fill="{StaticResource WindowHeaderBackground}"/>
                            <Rectangle x:Name="BackgroundVisual" Grid.Row="1" Fill="{TemplateBinding BorderBackground}"/>
                            <Grid x:Name="Header">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Thumb x:Name="titleThumb" Grid.ColumnSpan="2" Style="{StaticResource WindowResizeThumbStyle}"/>
                                <Grid Grid.Column="0" Margin="2 0 0 0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <ContentPresenter x:Name="IconContent"
                                            Grid.Column="0"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Center"
                                            Margin="2"
                                            Content="{TemplateBinding Icon}"
                                            ContentTemplate="{TemplateBinding IconTemplate}"/>
                                    <ContentPresenter x:Name="HeaderContent"
                                            Grid.Column="1"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Center"
                                            Content="{TemplateBinding Header}"
                                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                                            SnapsToDevicePixels="True"
                                            ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"/>
                                </Grid>
                                <Border x:Name="PART_HeaderButtonsBorder" Grid.Column="1">
                                    <StackPanel x:Name="HeaderButtons" Grid.Column="1" Orientation="Horizontal" Margin="0 0 3 0">
                                        <telerik:RadButton x:Name="PART_MinimizeButton"
                                                Command="{x:Static telerik:WindowCommands.Minimize}"
                                                Style="{StaticResource WindowButtonStyle}"
                                                Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                            <ToolTipService.ToolTip>
                                                <ToolTip telerik:LocalizationManager.ResourceKey="Minimize"/>
                                            </ToolTipService.ToolTip>
                                            <Path Fill="{StaticResource WindowButtonIconFill}" Stroke="{StaticResource WindowButtonIconStroke}" Width="14" Height="14" Data="M1.5,7.5 L12.5,7.5 12.5,11.5 1.5,11.5 Z"/>
                                        </telerik:RadButton>
                                        <telerik:RadButton x:Name="PART_RestoreButton"
                                                Command="{x:Static telerik:WindowCommands.Restore}"
                                                Style="{StaticResource WindowButtonStyle}"
                                                Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                            <ToolTipService.ToolTip>
                                                <ToolTip telerik:LocalizationManager.ResourceKey="Restore"/>
                                            </ToolTipService.ToolTip>
                                            <Path
                                                    Fill="{StaticResource WindowButtonIconFill}"
                                                    Stroke="{StaticResource WindowButtonIconStroke}"
                                                    Width="14"
                                                    Height="14"
                                                    Data="M0.5,4.5 0.5,11.5 1.5,12.5 8.5,12.5 9.5,11.5 9.5,3.5 1.5,3.5 Z M3.5,6.5 L3.5,9.5 L6.5,9.5 6.5,6.5 Z M3.5,3.5 3.5,1.5 4.5,0.5 11.5,0.5 12.5,1.5 12.5,9.5 11.5,10.5 9.5,10.5 9.5,3.5 Z"/>
                                        </telerik:RadButton>
                                        <telerik:RadButton x:Name="PART_MaximizeButton"
                                                Command="{x:Static telerik:WindowCommands.Maximize}"
                                                Style="{StaticResource WindowButtonStyle}"
                                                Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                            <ToolTipService.ToolTip>
                                                <ToolTip telerik:LocalizationManager.ResourceKey="Maximize"/>
                                            </ToolTipService.ToolTip>
                                            <Path
                                                    Fill="{StaticResource WindowButtonIconFill}"
                                                    Stroke="{StaticResource WindowButtonIconStroke}"
                                                    Width="14"
                                                    Height="14"
                                                    Data="M1.5,2.5 L12.5,2.5 12.5,11.5 1.5,11.5 Z M4.5,5.5 L9.5,5.5 9.5,8.5 4.5,8.5 Z"/>
                                        </telerik:RadButton>
                                        <telerik:RadButton x:Name="PART_CloseButton"
                                                Command="{x:Static telerik:WindowCommands.Close}"
                                                Style="{StaticResource WindowButtonStyle}"
                                                Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                            <ToolTipService.ToolTip>
                                                <ToolTip telerik:LocalizationManager.ResourceKey="Close"/>
                                            </ToolTipService.ToolTip>
                                            <Path
                                                    Fill="{StaticResource WindowButtonIconFill}"
                                                    Stroke="{StaticResource WindowButtonIconStroke}"
                                                    Width="14"
                                                    Height="14"
                                                    Data="M1.5,3.5 L2.5,2.5 4.5,2.5 6.5,4.5 8.5,2.5 10.5,2.5 11.5,3.5 8.5,6.5 8.5,7.5 11.5,10.5 10.5,11.5 8.5,11.5 6.5,9.5 4.5,11.5 2.5,11.5 1.5,10.5 4.5,7.5 4.5,6.5 z"/>
                                        </telerik:RadButton>
                                    </StackPanel>
                                </Border>
                            </Grid>
                            <Border x:Name="ContentOuterBorder" Grid.Row="1" Margin="{TemplateBinding BorderThickness}" BorderThickness="1" BorderBrush="{StaticResource WindowInnerBorder}">
                                <Border x:Name="ContentInnerBorder" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                                    <ContentPresenter x:Name="ContentElement" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                </Border>
                            </Border>
                        </Grid>
                    </AdornerDecorator>
                </Border>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadWindowStyle" TargetType="telerikNavigation:RadWindow">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource WindowBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource WindowOuterBorder}"/>
        <Setter Property="BorderBackground" Value="{StaticResource WindowBorderBackground}"/>
        <Setter Property="BorderThickness" Value="2 0 2 2"/>
        <Setter Property="MinHeight" Value="36"/>
        <Setter Property="MinWidth" Value="110"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Header" Value="RadWindow"/>
        <Setter Property="WindowStartupLocation" Value="Manual"/>
        <Setter Property="WindowState" Value="Normal"/>
        <Setter Property="CaptionHeight" Value="29"/>
        <Setter Property="ResizeBorder" Value="8 6 10 10"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template" Value="{StaticResource RadWindowTemplate}"/>
        <Setter Property="ModalBackground" Value="{StaticResource WindowModalBackground}"/>
        <Setter Property="animation:AnimationManager.AnimationSelector">
            <Setter.Value>
                <animation:AnimationSelector>
                    <animation:AnimationGroup AnimationName="Show">
                        <animation:FadeAnimation Direction="In" TargetElementName="LayoutRoot"/>
                        <animation:ScaleAnimation Direction="In" TargetElementName="LayoutRoot" MinScale="0.9"/>
                    </animation:AnimationGroup>
                    <animation:AnimationGroup AnimationName="Hide">
                        <animation:FadeAnimation Direction="Out" TargetElementName="LayoutRoot"/>
                        <animation:ScaleAnimation Direction="Out" TargetElementName="LayoutRoot" MinScale="0.9"/>
                    </animation:AnimationGroup>
                </animation:AnimationSelector>
            </Setter.Value>
        </Setter>
        <Setter Property="navigation:RadWindowInteropHelper.OpaqueWindowBackground" Value="{StaticResource WindowBorderBackground}"/>
        <Style.Triggers>
            <Trigger Property="navigation:RadWindowInteropHelper.AllowTransparency" Value="False">
                <Setter Property="navigation:RadWindowInteropHelper.ClipMaskCornerRadius" Value="10"/>
                <Setter Property="ResizeBorder" Value="6"/>
                <Setter Property="CaptionHeight" Value="26"/>
                <Setter Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="RadPromptStyle" TargetType="telerikNavigation:RadPrompt">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Width" Value="350"/>
        <Setter Property="IconTemplate" Value="{StaticResource ConfirmIconTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadPrompt">
                    <Grid x:Name="LayoutRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <ContentPresenter x:Name="Icon" VerticalAlignment="Top" Margin="16 8 8 8" ContentTemplate="{TemplateBinding IconTemplate}"/>
                        <StackPanel x:Name="PromptContent" Grid.Row="0" Grid.Column="1" FocusManager.FocusedElement="{Binding ElementName=PromptTextBox}">
                            <ScrollViewer IsTabStop="False" Grid.Row="0" Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0 0 0 8">
                                <ContentPresenter x:Name="PromptText" Margin="8 8 8 0"/>
                            </ScrollViewer>
                            <TextBox x:Name="PromptTextBox" Margin="8" IsTabStop="True" TabIndex="0" Focusable="True"/>
                        </StackPanel>
                        <Border x:Name="HorizontalRule"
                                Grid.Row="1"
                                Grid.ColumnSpan="2"
                                BorderThickness="0 0 0 1"
                                Height="2"
                                Background="{StaticResource BorderLineOuterColor}"
                                BorderBrush="{StaticResource BorderLineInnerColor}"
                                VerticalAlignment="Top"/>
                        <StackPanel x:Name="DialogButtons" Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
                            <telerik:RadButton x:Name="OK"
                                    Command="{x:Static telerik:WindowCommands.Confirm}"
                                    telerikNavigation:RadWindow.ResponseButton="Accept"
                                    MinWidth="70"
                                    IsTabStop="True"
                                    TabIndex="1"
                                    HorizontalAlignment="Right"
                                    telerik:LocalizationManager.ResourceKey="Ok"
                                    Margin="0 10 8 8"/>
                            <telerik:RadButton x:Name="Cancel"
                                    Command="{x:Static telerik:WindowCommands.Cancel}"
                                    telerikNavigation:RadWindow.ResponseButton="Cancel"
                                    MinWidth="70"
                                    IsTabStop="True"
                                    TabIndex="2"
                                    HorizontalAlignment="Right"
                                    telerik:LocalizationManager.ResourceKey="Cancel"
                                    Margin="0 10 8 8"/>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikNavigation:RadPrompt" BasedOn="{StaticResource RadPromptStyle}"/>
    <Style x:Key="RadConfirmStyle" TargetType="telerikNavigation:RadConfirm">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinWidth" Value="275"/>
        <Setter Property="MaxWidth" Value="500"/>
        <Setter Property="IconTemplate" Value="{StaticResource ConfirmIconTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadConfirm">
                    <Grid x:Name="LayoutRoot">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <ContentPresenter x:Name="Icon" VerticalAlignment="Top" Margin="16 8 8 8" ContentTemplate="{TemplateBinding IconTemplate}"/>
                        <ScrollViewer IsTabStop="False" Grid.Row="0" Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0 0 0 8">
                            <ContentPresenter x:Name="ConfirmText" Margin="8 8 8 0"/>
                        </ScrollViewer>
                        <Border x:Name="HorizontalRule"
                                Grid.Row="1"
                                Grid.ColumnSpan="2"
                                BorderThickness="0 0 0 1"
                                Height="2"
                                Background="{StaticResource BorderLineOuterColor}"
                                BorderBrush="{StaticResource BorderLineInnerColor}"
                                VerticalAlignment="Top"/>
                        <StackPanel x:Name="DialogButtons" Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" FocusManager.FocusedElement="{Binding ElementName=OK}">
                            <telerik:RadButton x:Name="OK"
                                    Command="{x:Static telerik:WindowCommands.Confirm}"
                                    telerikNavigation:RadWindow.ResponseButton="Accept"
                                    MinWidth="70"
                                    IsTabStop="True"
                                    TabIndex="0"
                                    HorizontalAlignment="Right"
                                    telerik:LocalizationManager.ResourceKey="Ok"
                                    Margin="0 10 8 8"/>
                            <telerik:RadButton x:Name="Cancel"
                                    Command="{x:Static telerik:WindowCommands.Cancel}"
                                    telerikNavigation:RadWindow.ResponseButton="Cancel"
                                    MinWidth="70"
                                    TabIndex="1"
                                    HorizontalAlignment="Right"
                                    telerik:LocalizationManager.ResourceKey="Cancel"
                                    Margin="0 10 8 8"/>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikNavigation:RadConfirm" BasedOn="{StaticResource RadConfirmStyle}"/>
    <Style x:Key="RadAlertStyle" TargetType="telerikNavigation:RadAlert">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinWidth" Value="275"/>
        <Setter Property="MaxWidth" Value="500"/>
        <Setter Property="IconTemplate" Value="{StaticResource AlertIconTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadAlert">
                    <Grid x:Name="LayoutRoot" FocusManager.FocusedElement="{Binding ElementName=OK}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.InputBindings>
                            <KeyBinding Key="Escape" Command="{x:Static telerik:WindowCommands.Confirm}"/>
                        </Grid.InputBindings>
                        <ContentPresenter x:Name="Icon" VerticalAlignment="Top" Margin="16 8 8 8" ContentTemplate="{TemplateBinding IconTemplate}"/>
                        <ScrollViewer IsTabStop="False" Grid.Row="0" Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0 0 0 8">
                            <ContentPresenter x:Name="AlertText" Margin="8 8 8 0"/>
                        </ScrollViewer>
                        <Border x:Name="HorizontalRule"
                                Grid.Row="1"
                                Grid.ColumnSpan="2"
                                BorderThickness="0 0 0 1"
                                Height="2"
                                Background="{StaticResource BorderLineOuterColor}"
                                BorderBrush="{StaticResource BorderLineInnerColor}"
                                VerticalAlignment="Top"/>
                        <telerik:RadButton x:Name="OK"
                                Command="{x:Static telerik:WindowCommands.Confirm}"
                                telerikNavigation:RadWindow.ResponseButton="Accept"
                                Grid.Row="1"
                                Grid.ColumnSpan="2"
                                MinWidth="70"
                                IsTabStop="True"
                                TabIndex="0"
                                HorizontalAlignment="Right"
                                telerik:LocalizationManager.ResourceKey="Ok"
                                Margin="0 10 8 8"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikNavigation:RadAlert" BasedOn="{StaticResource RadAlertStyle}"/>
    <SolidColorBrush x:Key="DialogLauncher_Fill1" Color="#FF6297B4"/>
    <SolidColorBrush x:Key="DialogLauncher_Fill2" Color="White"/>
    <SolidColorBrush x:Key="ApplicationMenu_OuterBorder" Color="#FFB0B0B0"/>
    <SolidColorBrush x:Key="ApplicationMenu_Background" Color="#FFF2F2F2"/>
    <SolidColorBrush x:Key="ApplicationMenu_Foreground" Color="#FF053187"/>
    <LinearGradientBrush x:Key="ApplicationMenu_ClippingRectangleFill" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFCFCFCF" Offset="1"/>
        <GradientStop Color="#FFF2F2F2" Offset="0"/>
        <GradientStop Color="#FFDDDDDD" Offset="0.51"/>
        <GradientStop Color="#FFEBEBEB" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonControlOuterBorder_Disabled" Color="#FFA9A9A9"/>
    <LinearGradientBrush x:Key="RibbonControlBackground_Disabled" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF7F7F7" Offset="0.004"/>
        <GradientStop Color="#FFE3E3E3" Offset="1"/>
        <GradientStop Color="#FFF3F3F3" Offset="0.5"/>
        <GradientStop Color="#FFEAEAEA" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonOuterBackground_Normal" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="RibbonControlBackground_Highlighted" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FFF1F8FD" Offset="0"/>
        <GradientStop Color="#FFD5EFFC" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonControlInnerBorder_Highlighted" Color="#FFE7F5FD"/>
    <SolidColorBrush x:Key="RibbonControlOuterBorder_Pressed" Color="#FF2C628B"/>
    <SolidColorBrush x:Key="RibbonPickerPopupBackground" Color="White"/>
    <SolidColorBrush x:Key="RibbonControlOuterBorder_Highlighted" Color="#B299DEFD"/>
    <CornerRadius x:Key="RibbonSplitButton_SpanInnerCornerRadius">1</CornerRadius>
    <SolidColorBrush x:Key="GroupChrome_OuterBorderBrush" Color="White"/>
    <SolidColorBrush x:Key="GroupChrome_BorderBrush" Color="#FF9CB6C5"/>
    <LinearGradientBrush x:Key="GroupChrome_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF1F8FB"/>
        <GradientStop Color="#FFF2FAFF" Offset="0.993"/>
        <GradientStop Color="#FFF3F8FB" Offset="0.133"/>
        <GradientStop Color="#FFDEEFF8" Offset="0.144"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GroupChrome_TrayBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFC6E3F3" Offset="0"/>
        <GradientStop Color="#FFCBE8F8" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="GroupHeaderBackgroundBrush" Color="#DDE7EE"/>
    <SolidColorBrush x:Key="GroupHeaderBorderBrush" Color="#C5C5C5"/>
    <CornerRadius x:Key="RibbonTabOuterCornerRadius">0 2 2 2</CornerRadius>
    <CornerRadius x:Key="RibbonTabInnerCornerRadius">0</CornerRadius>
    <SolidColorBrush x:Key="RibbonBackgroundBrush" Color="#FFF2F2F2"/>
    <SolidColorBrush x:Key="RibbonForegroundBrush" Color="#15428B"/>
    <LinearGradientBrush x:Key="RibbonTitlebarBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF83ABC0" Offset="0"/>
        <GradientStop Color="#FF4D95A9" Offset="1"/>
        <GradientStop Color="#FF3F7E9D" Offset="0.5"/>
        <GradientStop Color="#FF0A5276" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonTitlebarApplicationNameBrush" Color="#FFFFFF"/>
    <LinearGradientBrush x:Key="RibbonTabBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF1F8FB"/>
        <GradientStop Color="#FFF2FAFF" Offset="0.993"/>
        <GradientStop Color="#FFF3F8FB" Offset="0.133"/>
        <GradientStop Color="#FFDEEFF8" Offset="0.144"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonTabOuterBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFA8C3CE" Offset="0"/>
        <GradientStop Color="#FF96B6C3" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonTabInnerBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFEFF9FF" Offset="0"/>
        <GradientStop Color="White" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush Color="#FFb6b5b5" x:Key="TabStripTabDividerBrush"/>
    <SolidColorBrush x:Key="TabMouseOverOuterBorder" Color="#FFA7C2CD"/>
    <SolidColorBrush x:Key="TabMouseOverInnerBorder" Color="#ffffff"/>
    <LinearGradientBrush x:Key="TabMouseOverBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#E5FFFFFF"/>
        <GradientStop Offset="1" Color="#FFEEF8FE"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TabSelectedOuterBorder" Color="#FF6F9CB4"/>
    <SolidColorBrush x:Key="TabSelectedInnerBorder" Color="#B2FFFFFF"/>
    <LinearGradientBrush x:Key="TabSelectedBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#FFEEF8FE"/>
        <GradientStop Offset="1" Color="#FFEEF8FE"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonGroupHeaderBrush" Color="#3E6AAA"/>
    <SolidColorBrush x:Key="RibbonGroupButtonBorderBrush" Color="#FF79BAD9"/>
    <SolidColorBrush x:Key="RibbonGroupButtonBackgroundBrush" Color="#55FFFFFF"/>
    <SolidColorBrush x:Key="RibbonGroupButtonBottomBrush" Color="#66B2DEF7"/>
    <SolidColorBrush x:Key="RibbonGroupButtonArrowHighlight" Color="#EFF6FC"/>
    <SolidColorBrush x:Key="RibbonGroupButtonArrow" Color="#567DB1"/>
    <SolidColorBrush x:Key="RibbonGroupSeparatorLightBrush" Color="#F8FAFC"/>
    <SolidColorBrush x:Key="ContextualGroup_Foreground" Color="White"/>
    <SolidColorBrush x:Key="ContextualGroup_BorderBrush" Color="White"/>
    <Thickness x:Key="ContextualGroup_OpacityMask_Thickness">-1 0 -1 0</Thickness>
    <LinearGradientBrush x:Key="ButtonGroupBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF1F8FB" Offset="0"/>
        <GradientStop Color="#FFDEEFF7" Offset="1"/>
        <GradientStop Color="#FFF6FBFE" Offset="0.435"/>
        <GradientStop Color="#FFDFF0F8" Offset="0.474"/>
    </LinearGradientBrush>
    <SolidColorBrush Color="#CCB4CFDA" x:Key="ButtonGroupOuterBorderBrush"/>
    <SolidColorBrush Color="#FFFFFFFF" x:Key="ButtonGroupInnerBorderBrush"/>
    <SolidColorBrush x:Key="ButtonGroupDividerLightBrush" Color="#44FFFFFF"/>
    <SolidColorBrush x:Key="RibbonPopupForegroundBrush" Color="#00156E"/>
    <SolidColorBrush x:Key="RibbonGalleryBorderBrush" Color="#FFB4CFDA"/>
    <SolidColorBrush x:Key="RibbonGalleryBackgroundBrush" Color="White"/>
    <LinearGradientBrush x:Key="RibbonGalleryItemBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF0F7FA" Offset="1"/>
        <GradientStop Color="#FFE3F3FC"/>
        <GradientStop Color="#FFEEF6FA" Offset="0.509"/>
        <GradientStop Color="#FFDDEEF6" Offset="0.491"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonGalleryHeaderBackground" Color="#FFF0F0F0"/>
    <SolidColorBrush x:Key="RibbonGalleryHeaderBorderBrush" Color="#FFB0B0B0"/>
    <SolidColorBrush x:Key="RibbonGalleryHeaderForeground" Color="#FF053187"/>
    <Thickness x:Key="RibbonGalleryHeaderBorderThickness">1 1 1 1</Thickness>
    <SolidColorBrush x:Key="ButtonHoverOuterBorderBrush" Color="#8C8E94"/>
    <SolidColorBrush x:Key="ButtonHoverInnerBorderBrush" Color="#FFFFFF"/>
    <LinearGradientBrush x:Key="ButtonPushedOuterBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF0F577A" Offset="0"/>
        <GradientStop Color="#FF6A9AB3" Offset="0.151"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ButtonPushedInnerBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFDFF0FB" Offset="0.0"/>
        <GradientStop Color="#FFD2ECFA" Offset="0.5"/>
        <GradientStop Color="#FFB5E0F9" Offset="0.5"/>
        <GradientStop Color="#FFA6D7F2" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonButtonDropDownFill" Color="Black"/>
    <LinearGradientBrush x:Key="QatBelowBackgroundBrush" EndPoint="0,1">
        <GradientStop Offset="0" Color="#cce4f1"/>
        <GradientStop Offset="1" Color="#cae3f1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="QatBelowOuterBorderBrush" Color="#7ea6bb"/>
    <SolidColorBrush x:Key="QatButtonArrowHighlight" Color="White"/>
    <LinearGradientBrush x:Key="PageScrollViewerButtonBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#F3F3F3" Offset="0"/>
        <GradientStop Color="#EBEBEB" Offset="0.2"/>
        <GradientStop Color="#DDDDDD" Offset="0.2"/>
        <GradientStop Color="#CDCDCD" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="PageScrollViewerHotButtonBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#EAF6FD" Offset="0"/>
        <GradientStop Color="#D9F0FC" Offset=".2"/>
        <GradientStop Color="#BEE6FD" Offset=".2"/>
        <GradientStop Color="#A7D9F5" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="PageScrollViewerPressedButtonBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FFDFF0FB" Offset="0"/>
        <GradientStop Color="#FFD2ECFA" Offset="0.2"/>
        <GradientStop Color="#FFB5E0F9" Offset="0.2"/>
        <GradientStop Color="#FFA6D7F2" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="PageScrollViewerButtonOuterBorderBrush" Color="#8C8E94"/>
    <SolidColorBrush x:Key="PageScrollViewerButtonInnerBorderBrush" Color="#FFFFFF"/>
    <LinearGradientBrush x:Key="PageScrollViewerButtonForegroundBrush" StartPoint="0,0" EndPoint="1,0">
        <GradientStop Offset="0" Color="#1A52AD"/>
        <GradientStop Offset="1" Color="#0F3168"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="QuickAccessKeyHintBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="White" Offset="0"/>
        <GradientStop Color="#FFDDEEF6" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="QuickAccessKeyHintBorderBrush" Color="#FF6F9BB3"/>
    <SolidColorBrush x:Key="QuickAccessKeyHintForegroundBrush" Color="#4C4C4C"/>
    <SolidColorBrush x:Key="RibbonComboBoxBorderBrush" Color="#CCB4CFDA"/>
    <SolidColorBrush x:Key="RibbonComboBoxForegroundBrush" Color="#000000"/>
    <SolidColorBrush x:Key="RadGalleryItemOver_background" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="RadGalleryItemPressed_background" Color="#FF2C628B"/>
    <SolidColorBrush x:Key="RadRibbonBarButtonOverBorder" Color="#FF3C7FB1"/>
    <LinearGradientBrush x:Key="RadRibbonBarButtonOverBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFDFF0FB" Offset="0"/>
        <GradientStop Color="#FFA6D7F2" Offset="1"/>
        <GradientStop Color="#FFD2ECFA" Offset="0.578"/>
        <GradientStop Color="#FFB5E0F9" Offset="0.595"/>
    </LinearGradientBrush>
    <SolidColorBrush Color="#FFFFFFFF" x:Key="RadRibbonBarButtonOverBorderInner"/>
    <SolidColorBrush x:Key="RadRibbonBarButtonPressedBorder" Color="#FF2C628B"/>
    <LinearGradientBrush x:Key="RadRibbonBarButtonPressedBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF6AB6DE" Offset="1"/>
        <GradientStop Color="#FF82C2E4" Offset="0.5"/>
        <GradientStop Color="#FF98D0ED" Offset="0.496"/>
        <GradientStop Color="#FFA9DEFB"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RadRibbonBarButtonPressedBorderInner" Color="#FF9EB0BA"/>
    <SolidColorBrush x:Key="RadRibbonBarButtonSelectedBorder" Color="#FF2C628B"/>
    <LinearGradientBrush x:Key="RadRibbonBarButtonSelectedBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF6AB6DE" Offset="1"/>
        <GradientStop Color="#FF82C2E4" Offset="0.5"/>
        <GradientStop Color="#FF98D0ED" Offset="0.496"/>
        <GradientStop Color="#FFA9DEFB"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RadRibbonBarButtonSelectedBorderInner" Color="#FF9EB0BA"/>
    <LinearGradientBrush x:Key="RadRibbonBarDropDownButtonPressedBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF0F577A" Offset="0"/>
        <GradientStop Color="#FF6A9AB3" Offset="0.151"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ApplicationRibbonButtonOverBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF7ABBDA" Offset="1"/>
        <GradientStop Color="#FF6F9DB5"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ApplicationRibbonButtonOverBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFDFF0FB" Offset="0"/>
        <GradientStop Color="#FFA6D7F2" Offset="1"/>
        <GradientStop Color="#FFD2ECFA" Offset="0.578"/>
        <GradientStop Color="#FFB5E0F9" Offset="0.595"/>
    </LinearGradientBrush>
    <SolidColorBrush Color="#FFFFFFFF" x:Key="ApplicationRibbonButtonOverBorderInner"/>
    <SolidColorBrush x:Key="RadRibbonGroupNormalBorderInner" Color="White"/>
    <SolidColorBrush x:Key="RadRibbonGroupOverBorder" Color="#FFB4CFDA"/>
    <LinearGradientBrush x:Key="RadRibbonGroupOverBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFDFDFD" Offset="0"/>
        <GradientStop Color="#FFE4F3FA" Offset="1"/>
        <GradientStop Color="White" Offset="0.18"/>
        <GradientStop Color="#FFF7FBFE" Offset="0.18"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RadRibbonGroupOverBorderInner" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="RadRibbonGroupPressedBorder" Color="#FF79BAD9"/>
    <LinearGradientBrush x:Key="RadRibbonGroupPressedBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB3DEF8" Offset="0.052"/>
        <GradientStop Color="#FFCFF0FC" Offset="1"/>
        <GradientStop Color="#FFC8EBFA" Offset="0.18"/>
        <GradientStop Color="#FFB3DEF8" Offset="0.18"/>
        <GradientStop Color="#FF7EB4D4" Offset="0"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RadRibbonGroupPressedBorderInner" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF69A3C5" Offset="0"/>
        <GradientStop Color="#FFC4E9FA" Offset="0.07"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonBarKeyTips_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF1F8FD" Offset="0"/>
        <GradientStop Color="#FFD5EFFC" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush Color="#FF898C95" x:Key="RibbonBarKeyTips_OuterBorderBrush"/>
    <SolidColorBrush Color="#FFFFFFFF" x:Key="RibbonBarKeyTips_InnerBorderBrush"/>
    <SolidColorBrush x:Key="RibbonWindow_TitlebarApplicationNameBrush" Color="#FF000000"/>
    <SolidColorBrush x:Key="ApplicationButtonType2010_Foreground" Color="White"/>
    <SolidColorBrush x:Key="ApplicationButtonType2010_OuterBorder" Color="#FF131C24"/>
    <LinearGradientBrush x:Key="ApplicationButtonType2010_InnerBorder" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFB2CCD8" Offset="0"/>
        <GradientStop Color="#FF96C3CE" Offset="1"/>
        <GradientStop Color="#FF87B2C3" Offset="0.5"/>
        <GradientStop Color="#FF75A4B7" Offset="0.5"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ApplicationButtonType2010_Background" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF83ABC0" Offset="0"/>
        <GradientStop Color="#FF4D95A9" Offset="1"/>
        <GradientStop Color="#FF3F7E9D" Offset="0.5"/>
        <GradientStop Color="#FF0A5276" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ApplicationButtonType2010_OuterBorder_MouseOver" Color="#FF0A5276"/>
    <LinearGradientBrush x:Key="ApplicationButtonType2010_InnerBorder_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#7EE9F6FD"/>
        <GradientStop Color="#7F9CBBCC" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ApplicationButtonType2010_Background_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF186081" Offset="0.5"/>
        <GradientStop Color="#FF83ABC0"/>
        <GradientStop Color="#FF80CFF9" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ApplicationButtonType2010_OuterBorder_Selected" Color="#FF0A5276"/>
    <LinearGradientBrush x:Key="ApplicationButtonType2010_InnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF55869F"/>
        <GradientStop Color="#7F9CBBCC" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ApplicationButtonType2010_Background_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF186081" Offset="0.5"/>
        <GradientStop Color="#FF3F7E9D"/>
        <GradientStop Color="#FF80CFF9" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_DottedLineBrush" StartPoint="0,0.5" EndPoint="4,0.5" MappingMode="Absolute" SpreadMethod="Repeat">
        <GradientStop Color="#40000000" Offset="0"/>
        <GradientStop Color="#40000000" Offset="0.5"/>
        <GradientStop Color="Transparent" Offset="0.501"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_Background" EndPoint="0.978,0.058" StartPoint="0.075,0.058">
        <GradientStop Color="#FFEFF7FC" Offset="0"/>
        <GradientStop Color="#FFF7FBFD" Offset="0.97"/>
        <GradientStop Color="#FFE8F2F7" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonnBackStage_BorderBrush" Color="#FFCFD0D1"/>
    <LinearGradientBrush x:Key="RibbonnBackStage_BorderBrushRight" EndPoint="0,0.5" StartPoint="1,0.5">
        <GradientStop Color="#11000000"/>
        <GradientStop Offset="1" Color="#00000000"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_TopLine" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FF4B93A7" Offset="0"/>
        <GradientStop Color="#FFFFFFFF" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RibbonnBackStage_BackgroundContent" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="RibbonnBackStage_Item_OuterBorderMouseOVer" Color="#FF0A5276"/>
    <SolidColorBrush x:Key="RibbonnBackStage_Item_InnerBorderMouseOVer" Color="#FF99DEFD"/>
    <SolidColorBrush x:Key="RibbonnBackStage_Item_BackgroundMouseOVer" Color="#FFE5F4FD"/>
    <SolidColorBrush x:Key="RibbonnBackStage_Item_OuterBorderSelected" Color="#FF0A5276"/>
    <LinearGradientBrush x:Key="RibbonnBackStage_Item_InnerBorderSelected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF0A5276" Offset="0"/>
        <GradientStop Color="#FF0A5276" Offset="1"/>
        <GradientStop Color="#004D95A9" Offset="0.1"/>
        <GradientStop Color="#004D95A9" Offset="0.9"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_Item_OuterBackgroundSelected" EndPoint="0.958,0.5" StartPoint="0.065,0.5">
        <GradientStop Color="#FF0A5276" Offset="0"/>
        <GradientStop Color="#FF0A5276" Offset="1"/>
        <GradientStop Color="#FF4D95A9" Offset="0.5"/>
    </LinearGradientBrush>
    <RadialGradientBrush x:Key="RibbonnBackStage_Item_InnerBackgroundSelected" GradientOrigin="1.017,0.053" RadiusY="1.009" RadiusX="0.74" Center="1.015,0.993">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <RotateTransform CenterX="0.857" CenterY="1.064" Angle="-180"/>
                <TranslateTransform X="-0.186" Y="-0.528"/>
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="#FF83ABC0" Offset="0.355"/>
        <GradientStop Color="#000A5276" Offset="1"/>
    </RadialGradientBrush>
    <SolidColorBrush Color="#FF000000" x:Key="RibbonBackstage_Item_Foreground"/>
    <SolidColorBrush Color="#FF000000" x:Key="RibbonBackstage_Item_HeaderForeground"/>
    <SolidColorBrush Color="#FFFFFFFF" x:Key="RibbonBackstage_Item_ForegroundSelected"/>
    <SolidColorBrush x:Key="RibbonnBackStage_ArrowBackground" Color="#FFFFFFFF"/>
    <LinearGradientBrush x:Key="RibbonnBackStage_CornerBackground" EndPoint="0.717000007629395,0.181999996304512" StartPoint="0.887000024318695,0.855000019073486">
        <GradientStop Color="#FF9ECBE2"/>
        <GradientStop Color="White" Offset="0.835"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_CornerPath1" EndPoint="1.25,0.306" StartPoint="1.259,0.306">
        <GradientStop Color="#0081C3E5"/>
        <GradientStop Color="#0081C3E5" Offset="0.157"/>
        <GradientStop Color="#2581C3E5" Offset="0.874"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_CornerPath2" EndPoint="0.954,0.137" StartPoint="0.483,0.911">
        <GradientStop Color="#5983ABC0"/>
        <GradientStop Color="#000A5276" Offset="0.787"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_CornerPath3" EndPoint="0.854,0.329" StartPoint="0.951,0.996">
        <GradientStop Color="#50005B87" Offset="0.143"/>
        <GradientStop Color="#184D95A9" Offset="0.733"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_CornerPath4" EndPoint="0.65,0.407" StartPoint="0.706,0.72">
        <GradientStop Color="#6D81C3E5" Offset="0.161"/>
        <GradientStop Color="#4FE1F3FD" Offset="0.695"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_CornerPath5" EndPoint="0.97,0.171" StartPoint="0.087,1.037">
        <GradientStop Color="#B6FFFFFF" Offset="0"/>
        <GradientStop Color="#80FFFFFF" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_CornerPath6" EndPoint="0.927999973297119,0.0370000004768372" StartPoint="0.0900000035762787,0.899999976158142">
        <GradientStop Color="#14006C9D" Offset="1"/>
        <GradientStop Color="#2F006C9D" Offset="0.48"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="RibbonnBackStage_CornerPath7" EndPoint="0.928,0.037" StartPoint="0.09,0.9">
        <GradientStop Color="#660874A8" Offset="0.142"/>
        <GradientStop Color="#5287B5CD" Offset="0.775"/>
    </LinearGradientBrush>
    <telerik:BooleanToVisibilityConverter x:Key="RibbonBooleanToVisibilityConverter"/>
    <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertBoolToVisConverter"/>
    <ControlTemplate x:Key="RadRibbonButtonTemplate" TargetType="telerikRibbonView:RadRibbonButton">
        <Grid>
            <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="ButtonBackgroundHover"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ButtonBackgroundHover"/>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ButtonBackgroundPressed"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ButtonBackgroundDecorator"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}">
                <Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="ButtonBackgroundPressed"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonPressedBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonPressedBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonPressedBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="ButtonBackgroundHover"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Grid
                    Margin="{TemplateBinding Padding}"
                    x:Name="ContentGrid"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Name="Image" VerticalAlignment="Top"/>
                <StackPanel x:Name="FirstRowContainer" Grid.Row="1" Tag="qq">
                    <ContentPresenter x:Name="ContentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            RecognizesAccessKey="True"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                            TextBlock.Foreground="{TemplateBinding Foreground}"/>
                    <TextBlock Name="textRow1" Text="{TemplateBinding TextRow1}" TextAlignment="Center" Foreground="{TemplateBinding Foreground}"/>
                </StackPanel>
                <TextBlock
                        Name="textRow2"
                        Grid.Row="2"
                        VerticalAlignment="Top"
                        Margin="0 -3 0 0"
                        Text="{TemplateBinding TextRow2}"
                        TextAlignment="Center"
                        Foreground="{TemplateBinding Foreground}"/>
            </Grid>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonButtonStyle" TargetType="telerikRibbonView:RadRibbonButton">
        <Setter Property="Template" Value="{StaticResource RadRibbonButtonTemplate}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="CornerRadius" Value="2"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonButton" BasedOn="{StaticResource RadRibbonButtonStyle}"/>
    <Style TargetType="telerik:RadToggleButton" x:Key="ToggleButtonStyle">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinWidth" Value="36"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Grid Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Chrome">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonOverBackground}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Chrome">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonOverBorder}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ChromeInner">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonOverBorderInner}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Chrome">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonPressedBackground}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Chrome">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonPressedBorder}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ChromeInner">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonPressedBorderInner}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="Path" Storyboard.TargetProperty="Opacity" Duration="0" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ChromeCheck" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unhecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ChromeCheck" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Chrome"
                                Grid.ColumnSpan="2"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border x:Name="ChromeInner" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}"/>
                        </Border>
                        <Border x:Name="ChromeCheck"
                                Grid.ColumnSpan="2"
                                Visibility="Collapsed"
                                Background="{StaticResource RadRibbonBarButtonPressedBackground}"
                                BorderBrush="{StaticResource RadRibbonBarButtonPressedBorder}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border BorderBrush="{StaticResource RadRibbonBarButtonPressedBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
                        </Border>
                        <Border Grid.Column="1">
                            <Path x:Name="Path" VerticalAlignment="Center" HorizontalAlignment="Right" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Data="M0,0L5,0L2.5,3z" Margin="5 0"/>
                        </Border>
                        <ContentPresenter x:Name="Content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="EditableRibbonComboBox" TargetType="telerikRibbonView:RadRibbonComboBox">
        <Grid x:Name="ContentPresenterBorder" Background="Transparent">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonOuterBackground_Normal}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonControlOuterBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource RibbonControlOuterBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonControlBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonControlBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PART_EditableTextBox" Storyboard.TargetProperty="Opacity" To="0.6"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0.6"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownOpen">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonControlOuterBorder_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </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>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <SolidColorBrush Color="Transparent"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    Background="{StaticResource RibbonOuterBackground_Normal}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="Border"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{x:Null}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBox x:Name="PART_EditableTextBox"
                    BorderThickness="0"
                    BorderBrush="Transparent"
                    Padding="{TemplateBinding Padding}"
                    FontSize="{TemplateBinding FontSize}"
                    Foreground="{TemplateBinding Foreground}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    Background="Transparent"
                    VerticalAlignment="Center"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                <TextBox.Template>
                    <ControlTemplate TargetType="TextBox">
                        <Grid>
                            <ScrollViewer
                                    Padding="{TemplateBinding Padding}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="Transparent"
                                    IsTabStop="False"
                                    VerticalScrollBarVisibility="Auto"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Name="PART_ContentHost"/>
                        </Grid>
                    </ControlTemplate>
                </TextBox.Template>
            </TextBox>
            <Border x:Name="KeyboardNavigationVisual" Opacity="0" Grid.Column="1" Background="{StaticResource RadRibbonBarButtonOverBackground}"/>
            <telerik:RadToggleButton x:Name="PART_DropDownButton"
                    Grid.Column="1"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Style="{StaticResource ToggleButtonStyle}"
                    IsTabStop="False"
                    IsChecked="{TemplateBinding IsDropDownOpen}"
                    IsEnabled="{TemplateBinding IsEnabled}"
                    MinWidth="15"/>
            <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}"
                            Margin="0 -1 0 0"
                            Background="{StaticResource RibbonPickerPopupBackground}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <telerik:RadButton x:Name="PART_ClearButton"
                                    Margin="-1 -1 -1 0"
                                    CornerRadius="0"
                                    Visibility="{TemplateBinding ClearSelectionButtonVisibility}"
                                    Content="{TemplateBinding ClearSelectionButtonContent}"/>
                            <ScrollViewer x:Name="PART_ScrollViewer"
                                    Grid.Row="1"
                                    Padding="0"
                                    BorderThickness="0"
                                    VerticalScrollBarVisibility="Auto"
                                    Foreground="{TemplateBinding Foreground}"
                                    CanContentScroll="True">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="NonEditableRibbonComboBox" TargetType="telerikRibbonView:RadRibbonComboBox">
        <Grid x:Name="ContentPresenterBorder" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenterElement" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.5"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonControlBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonControlOuterBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownOpen"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <SolidColorBrush Color="Transparent"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" IsHitTestVisible="False" Background="{StaticResource RibbonOuterBackground_Normal}"/>
            <Border x:Name="Border" IsHitTestVisible="False" Background="{TemplateBinding Background}"/>
            <Border x:Name="KeyboardNavigationVisual" Opacity="0" Background="{StaticResource RadRibbonBarButtonOverBackground}"/>
            <telerik:RadToggleButton x:Name="PART_DropDownButton"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Style="{StaticResource ToggleButtonStyle}"
                    ClickMode="Press"
                    IsChecked="{TemplateBinding IsDropDownOpen}"
                    IsEnabled="{TemplateBinding IsEnabled}"
                    IsTabStop="False">
                <ContentPresenter x:Name="ContentPresenterElement"
                        Margin="{TemplateBinding Padding}"
                        IsHitTestVisible="False"
                        Content="{TemplateBinding SelectionBoxItem}"
                        ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </telerik:RadToggleButton>
            <Popup x:Name="PART_Popup">
                <Grid x:Name="PopupRoot">
                    <Border
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            Margin="0 -1 0 0"
                            Background="{StaticResource RibbonPickerPopupBackground}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <telerik:RadButton x:Name="PART_ClearButton" 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"
                                    BorderThickness="0"
                                    VerticalScrollBarVisibility="Auto"
                                    Margin="0"
                                    CanContentScroll="True">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonComboBoxStyle" TargetType="telerikRibbonView:RadRibbonComboBox">
        <Setter Property="Template" Value="{StaticResource EditableRibbonComboBox}"/>
        <Setter Property="Foreground" Value="{StaticResource RibbonComboBoxForegroundBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{StaticResource RibbonComboBoxBorderBrush}"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="Padding" Value="6 2"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="IsEditable" Value="True"/>
        <Setter Property="Margin" Value="0 0 1 0"/>
        <Setter Property="ClearSelectionButtonContent" Value="Clear"/>
        <Setter Property="EditableTemplate" Value="{StaticResource EditableRibbonComboBox}"/>
        <Setter Property="NonEditableTemplate" Value="{StaticResource NonEditableRibbonComboBox}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
    </Style>
    <ControlTemplate x:Key="RibbonComboBoxItemTemplate" TargetType="telerikRibbonView:RadRibbonComboBoxItem">
        <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.3"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
                <Border x:Name="HighlightVisual"
                        Visibility="Collapsed"
                        Background="{StaticResource RibbonControlBackground_Highlighted}"
                        BorderBrush="{StaticResource RibbonControlOuterBorder_Highlighted}"
                        BorderThickness="1">
                    <Border BorderThickness="1" CornerRadius="{StaticResource RibbonSplitButton_SpanInnerCornerRadius}" BorderBrush="{StaticResource RibbonControlInnerBorder_Highlighted}"/>
                </Border>
                <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" VerticalAlignment="Center"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="RadRibbonComboBoxItemStyle" TargetType="telerikRibbonView:RadRibbonComboBoxItem">
        <Setter Property="Template" Value="{StaticResource RibbonComboBoxItemTemplate}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{StaticResource RibbonComboBoxForegroundBrush}"/>
        <Setter Property="Padding" Value="3 2"/>
        <Setter Property="MinHeight" Value="19"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonComboBoxItem" BasedOn="{StaticResource RadRibbonComboBoxItemStyle}"/>
    <Style TargetType="telerikRibbonView:RadRibbonComboBox" BasedOn="{StaticResource RadRibbonComboBoxStyle}"/>
    <ControlTemplate x:Key="RadRibbonDropDownButtonTemplate" TargetType="telerikRibbonView:RadRibbonDropDownButton">
        <Grid>
            <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="MouseOverVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PressedVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard Duration="0">
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusState">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="IsOpenState">
                    <VisualState x:Name="Closed"/>
                    <VisualState x:Name="Opened">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownButtonPositionState">
                    <VisualState x:Name="DropDownButtonAtTop"/>
                    <VisualState x:Name="DropDownButtonAtLeft"/>
                    <VisualState x:Name="DropDownButtonAtBottom"/>
                    <VisualState x:Name="DropDownButtonAtRight">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.Column)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>3</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.Row)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>0</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Center</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>3</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>3</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(Grid.Column)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>1</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FirstRowContainer" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>3</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FirstRowContainer" Storyboard.TargetProperty="(Grid.Column)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>1</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FirstRowContainer" Storyboard.TargetProperty="Orientation">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Orientation>Horizontal</Orientation>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Image" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>3</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownPlacementState">
                    <VisualState x:Name="PlacementBottom"/>
                    <VisualState x:Name="PlacementTop"/>
                    <VisualState x:Name="PlacementLeft"/>
                    <VisualState x:Name="PlacementRight"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownContentState">
                    <VisualState x:Name="HasDropDownContent"/>
                    <VisualState x:Name="WithoutDropDownContent">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DropDownIndicator">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropShadowVisibilityState">
                    <VisualState x:Name="HasShadow"/>
                    <VisualState x:Name="WithoutShadow"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="NormalVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}">
                <Border BorderBrush="Transparent" BorderThickness="1"/>
            </Border>
            <Border x:Name="PressedVisual"
                    Background="{StaticResource RadRibbonBarButtonPressedBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonPressedBorder}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonPressedBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="CheckedVisual"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonSelectedBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonSelectedBorder}"
                    BorderThickness="{TemplateBinding BorderThickness}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonSelectedBorderInner}" BorderThickness="1"/>
            </Border>
            <Border x:Name="MouseOverVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Grid x:Name="ContentGrid" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Image Name="Image"/>
                <StackPanel x:Name="FirstRowContainer" Grid.Row="1">
                    <ContentPresenter x:Name="ContentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            RecognizesAccessKey="True"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                            TextBlock.Foreground="{TemplateBinding Foreground}"/>
                    <TextBlock Name="textRow1" Grid.Row="1" Text="{TemplateBinding TextRow1}" TextAlignment="Center" Foreground="{TemplateBinding Foreground}"/>
                </StackPanel>
                <StackPanel Name="DropDownPanel" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Orientation="Horizontal" Margin="0 -3 0 0">
                    <TextBlock Name="textRow2" Text="{TemplateBinding TextRow2}" Foreground="{TemplateBinding Foreground}"/>
                    <Path
                            Name="DropDownIndicator"
                            IsHitTestVisible="False"
                            VerticalAlignment="Center"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Fill="{StaticResource RibbonButtonDropDownFill}"
                            Margin="2 5"
                            Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z"/>
                </StackPanel>
            </Grid>
            <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom">
                <Grid>
                    <Border x:Name="DropDownPopupBorder"
                            BorderThickness="1"
                            Padding="1"
                            Margin="0"
                            MinWidth="3"
                            MinHeight="3"
                            Width="{TemplateBinding DropDownWidth}"
                            Height="{TemplateBinding DropDownHeight}"
                            MaxWidth="{TemplateBinding DropDownMaxWidth}"
                            MaxHeight="{TemplateBinding DropDownMaxHeight}"
                            Background="{StaticResource DropDownPopupBackgroundBrush}"
                            BorderBrush="{StaticResource DropDownPopupBorderBrush}">
                        <ContentControl x:Name="DropDownPopupContent"
                                Content="{TemplateBinding DropDownContent}"
                                IsTabStop="False"
                                ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonDropDownButtonStyle" TargetType="telerikRibbonView:RadRibbonDropDownButton">
        <Setter Property="Template" Value="{StaticResource RadRibbonDropDownButtonTemplate}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="2"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="DropDownButtonPosition" Value="Bottom"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonDropDownButton" BasedOn="{StaticResource RadRibbonDropDownButtonStyle}"/>
    <ControlTemplate x:Key="RadRibbonRadioButtonTemplate" TargetType="telerikRibbonView:RadRibbonRadioButton">
        <Grid>
            <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="MouseOverVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PressedVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Unchecked"/>
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="NormalVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}">
                <Border BorderBrush="Transparent" BorderThickness="1"/>
            </Border>
            <Border x:Name="PressedVisual"
                    Background="{StaticResource RadRibbonBarButtonPressedBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonPressedBorder}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonPressedBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="CheckedVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonSelectedBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonSelectedBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonSelectedBorderInner}" BorderThickness="1"/>
            </Border>
            <Border x:Name="MouseOverVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="ContentGrid">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Name="Image" VerticalAlignment="Top"/>
                <StackPanel x:Name="FirstRowContainer" Grid.Row="1">
                    <ContentPresenter x:Name="ContentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            RecognizesAccessKey="True"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                            TextBlock.Foreground="{TemplateBinding Foreground}"/>
                    <TextBlock Name="textRow1" Text="{TemplateBinding TextRow1}" TextAlignment="Center" Foreground="{TemplateBinding Foreground}"/>
                </StackPanel>
                <TextBlock
                        Name="textRow2"
                        Grid.Row="2"
                        VerticalAlignment="Top"
                        Margin="0 -3 0 0"
                        Text="{TemplateBinding TextRow2}"
                        TextAlignment="Center"
                        Foreground="{TemplateBinding Foreground}"/>
            </Grid>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonRadioButtonStyle" TargetType="telerikRibbonView:RadRibbonRadioButton">
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="2"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template" Value="{StaticResource RadRibbonRadioButtonTemplate}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonRadioButton" BasedOn="{StaticResource RadRibbonRadioButtonStyle}"/>
    <ControlTemplate x:Key="RadRibbonSplitButtonTemplate" TargetType="telerikRibbonView:RadRibbonSplitButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="mouseOverDecorator" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SeparatorPart" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard/>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="Opacity"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="IsBackgroundVisible">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>False</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="IsBackgroundVisible">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>False</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="IsOpenState">
                    <VisualState x:Name="Closed"/>
                    <VisualState x:Name="Opened">
                        <Storyboard/>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusState">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="Text1VisibilityState">
                    <VisualState x:Name="Text1Show"/>
                    <VisualState x:Name="Text1Hide">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Padding">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>1 0 3 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="Text2VisibilityState">
                    <VisualState x:Name="Text2Show"/>
                    <VisualState x:Name="Text2Hide">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Padding">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>2 0 3 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownButtonPositionState">
                    <VisualState x:Name="DropDownButtonAtTop"/>
                    <VisualState x:Name="DropDownButtonAtLeft"/>
                    <VisualState x:Name="DropDownButtonAtBottom">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Image" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>3 3 3 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownButtonAtRight">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>4</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.Column)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>4</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.Row)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>0</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>1 0 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Center</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckBorderButton" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>4</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckBorderButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckBorderButton" Storyboard.TargetProperty="CornerRadius">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <CornerRadius>3 0 0 3</CornerRadius>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SeparatorPart" Storyboard.TargetProperty="HorizontalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <HorizontalAlignment>Right</HorizontalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SeparatorPart" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Stretch</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SeparatorPart" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>4</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="CornerRadius">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <CornerRadius>3 0 0 3</CornerRadius>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="CornerRadius">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <CornerRadius>0 3 3 0</CornerRadius>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <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>0</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="(Grid.Row)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>0</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="(Grid.Column)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>1</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>4 0 1 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="VerticalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <VerticalAlignment>Center</VerticalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="HorizontalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <HorizontalAlignment>Left</HorizontalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="TextAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <TextAlignment>Left</TextAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>4</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>1</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Image" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>4</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Image" Storyboard.TargetProperty="(Grid.ColumnSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>1</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownContentState">
                    <VisualState x:Name="HasDropDownContent"/>
                    <VisualState x:Name="WithoutDropDownContent">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DropDownIndicator">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="IsOpenOrChecked">
                    <VisualState x:Name="OpenOrChecked">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonSelectedBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Storyboard.TargetName="checkedDecorator" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="IsBackgroundVisible">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Boolean>True</sys:Boolean>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="NotOpenNotChecked"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="backgroundDecorator"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2">
                <Border x:Name="backgroundDecoratorInner" BorderThickness="0" BorderBrush="{x:Null}"/>
            </Border>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Grid x:Name="ContentGrid">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="ButtonPart"
                        Grid.ColumnSpan="3"
                        MinHeight="0"
                        MinWidth="0"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        IsBackgroundVisible="{TemplateBinding IsBackgroundVisible}"
                        Background="Transparent"
                        IsTabStop="False"
                        Style="{TemplateBinding ButtonPartStyle}"
                        Foreground="{TemplateBinding Foreground}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                        Padding="{TemplateBinding Padding}"
                        ContentStringFormat="{TemplateBinding ContentStringFormat}"
                        CornerRadius="3 3 0 0"/>
                <Border x:Name="CheckBorderButton"
                        Grid.ColumnSpan="3"
                        CornerRadius="2 2 0 0"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{x:Null}"
                        Margin="1"
                        Opacity="0"
                        BorderBrush="{StaticResource RadRibbonBarButtonPressedBorderInner}"/>
                <telerik:RadToggleButton x:Name="DropDownPart"
                        Grid.Row="1"
                        Grid.RowSpan="4"
                        Foreground="{TemplateBinding Foreground}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        MinHeight="0"
                        Style="{TemplateBinding TogglePartStyle}"
                        Grid.ColumnSpan="2"
                        Background="Transparent"
                        IsTabStop="False"
                        Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                        HorizontalAlignment="Stretch"
                        Padding="6"
                        CornerRadius="0 0 3 3"
                        IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                <Rectangle x:Name="SeparatorPart"
                        Grid.ColumnSpan="2"
                        MinWidth="1"
                        MinHeight="1"
                        Visibility="Collapsed"
                        IsHitTestVisible="False"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Bottom"
                        Fill="{StaticResource RadRibbonBarButtonOverBorder}"
                        SnapsToDevicePixels="True"/>
                <Image Name="Image" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" Grid.ColumnSpan="2" HorizontalAlignment="Center"/>
                <TextBlock
                        Name="textRow1"
                        Grid.Row="1"
                        Grid.ColumnSpan="2"
                        IsHitTestVisible="False"
                        Padding="3 0"
                        Text="{TemplateBinding TextRow1}"
                        TextAlignment="Center"
                        Foreground="{TemplateBinding Foreground}"/>
                <StackPanel
                        Name="DropDownPanel"
                        VerticalAlignment="Top"
                        Grid.Row="2"
                        Grid.ColumnSpan="2"
                        Grid.RowSpan="2"
                        HorizontalAlignment="Center"
                        Orientation="Horizontal"
                        Margin="3 -3 3 0"
                        IsHitTestVisible="False">
                    <TextBlock Name="textRow2" Text="{TemplateBinding TextRow2}" IsHitTestVisible="False" Foreground="{TemplateBinding Foreground}"/>
                    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Path x:Name="DropDownIndicator"
                                IsHitTestVisible="False"
                                Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                                SnapsToDevicePixels="True"
                                Fill="{StaticResource RibbonButtonDropDownFill}"
                                Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z"
                                Margin="2 3"/>
                    </Grid>
                </StackPanel>
            </Grid>
            <Border x:Name="mouseOverDecorator"
                    Opacity="0"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}"
                    CornerRadius="2"/>
            <Border x:Name="checkedDecorator"
                    Opacity="0"
                    BorderBrush="{StaticResource RadRibbonBarButtonSelectedBorder}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2"/>
            <Popup x:Name="DropDownPopup"
                    AllowsTransparency="True"
                    StaysOpen="False"
                    Focusable="False"
                    Placement="Bottom"
                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                <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 DropDownPopupBackgroundBrush}"
                            BorderBrush="{StaticResource DropDownPopupBorderBrush}"
                            Padding="1">
                        <ContentControl x:Name="DropDownPopupContent"
                                IsTabStop="False"
                                Content="{TemplateBinding DropDownContent}"
                                ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                    </Border>
                </Grid>
            </Popup>
            <Rectangle x:Name="disabledDecorator" Visibility="Collapsed" Opacity="0" Fill="#FFFFFFFF"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonSplitButtonStyle" TargetType="telerikRibbonView:RadRibbonSplitButton">
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="ButtonPartStyle" Value="{StaticResource RadButtonStyle}"/>
        <Setter Property="TogglePartStyle" Value="{StaticResource RadToggleButtonStyle}"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template" Value="{StaticResource RadRibbonSplitButtonTemplate}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonSplitButton" BasedOn="{StaticResource RadRibbonSplitButtonStyle}"/>
    <ControlTemplate x:Key="RadRibbonToggleButtonTemplate" TargetType="telerikRibbonView:RadRibbonToggleButton">
        <Grid>
            <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="MouseOverVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PressedVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Unchecked"/>
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="NormalVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}">
                <Border BorderBrush="Transparent" BorderThickness="1"/>
            </Border>
            <Border x:Name="PressedVisual"
                    Background="{StaticResource RadRibbonBarButtonPressedBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonPressedBorder}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonPressedBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="CheckedVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonSelectedBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonSelectedBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonSelectedBorderInner}" BorderThickness="1"/>
            </Border>
            <Border x:Name="MouseOverVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Grid x:Name="ContentGrid" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Name="Image" VerticalAlignment="Top"/>
                <StackPanel x:Name="FirstRowContainer" Grid.Row="1">
                    <ContentPresenter x:Name="ContentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            RecognizesAccessKey="True"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                            TextBlock.Foreground="{TemplateBinding Foreground}"/>
                    <TextBlock Name="textRow1" Text="{TemplateBinding TextRow1}" TextAlignment="Center" Foreground="{TemplateBinding Foreground}"/>
                </StackPanel>
                <TextBlock
                        Name="textRow2"
                        Grid.Row="2"
                        VerticalAlignment="Top"
                        Margin="0 -3 0 0"
                        Text="{TemplateBinding TextRow2}"
                        TextAlignment="Center"
                        Foreground="{TemplateBinding Foreground}"/>
            </Grid>
            <Rectangle x:Name="Background_Disabled" Visibility="Collapsed" Fill="#99FFFFFF"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonToggleButtonStyle" TargetType="telerikRibbonView:RadRibbonToggleButton">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="CornerRadius" Value="2"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template" Value="{StaticResource RadRibbonToggleButtonTemplate}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonToggleButton" BasedOn="{StaticResource RadRibbonToggleButtonStyle}"/>
    <ControlTemplate x:Key="ApplicationDropDownButtonTemplate" TargetType="telerikRibbonViewPrimitives:RadRibbonApplicationDropDownButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverPart" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="00:00:00.1" Storyboard.TargetName="PressedPart" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="IsOpenState">
                    <VisualState x:Name="Closed"/>
                    <VisualState x:Name="Opened">
                        <Storyboard>
                            <DoubleAnimation Duration="00:00:00.1" Storyboard.TargetName="isOpenIndicator" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="KeyboardNavigationVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2 2 0 0">
                <Border BorderBrush="{StaticResource ApplicationButtonType2010_InnerBorder}" BorderThickness="1" CornerRadius="1 1 0 0"/>
            </Border>
            <Border x:Name="MouseOverPart"
                    Background="{StaticResource ApplicationButtonType2010_Background_MouseOver}"
                    BorderBrush="{StaticResource ApplicationButtonType2010_OuterBorder_MouseOver}"
                    BorderThickness="1 1 1 0"
                    CornerRadius="2 2 0 0"
                    Opacity="0">
                <Border BorderBrush="{StaticResource ApplicationButtonType2010_InnerBorder_MouseOver}" BorderThickness="1 1 1 0" CornerRadius="1 1 0 0"/>
            </Border>
            <Border x:Name="PressedPart"
                    Background="{StaticResource ApplicationButtonType2010_Background_Selected}"
                    BorderBrush="{StaticResource ApplicationButtonType2010_OuterBorder_Selected}"
                    BorderThickness="1 1 1 0"
                    CornerRadius="2 2 0 0"
                    Opacity="0">
                <Border BorderBrush="{StaticResource ApplicationButtonType2010_InnerBorder_Selected}" BorderThickness="1 1 1 0" CornerRadius="1 1 0 0"/>
            </Border>
            <Border x:Name="isOpenIndicator"
                    Opacity="0"
                    Background="{StaticResource ApplicationButtonType2010_Background_Selected}"
                    BorderBrush="{StaticResource ApplicationButtonType2010_OuterBorder_Selected}"
                    BorderThickness="1 1 1 0"
                    CornerRadius="1 1 0 0">
                <Border BorderBrush="{StaticResource ApplicationButtonType2010_InnerBorder_Selected}" BorderThickness="1 1 1 0" CornerRadius="1 1 0 0"/>
            </Border>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    Background="{StaticResource ApplicationButtonType2010_Background_MouseOver}"
                    BorderBrush="{StaticResource ApplicationButtonType2010_OuterBorder_MouseOver}"
                    BorderThickness="1 1 1 0"
                    CornerRadius="2 2 0 0">
                <Border BorderBrush="{StaticResource ApplicationButtonType2010_InnerBorder_MouseOver}" BorderThickness="1 1 1 0" CornerRadius="1 1 0 0"/>
            </Border>
            <Grid x:Name="ContentGrid" Margin="{TemplateBinding Padding}">
                <ContentPresenter
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"/>
                <Image x:Name="Image" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Stretch="None"/>
                <TextBlock x:Name="textRow1" Margin="0 2 0 0" Text="{TemplateBinding TextRow1}" TextAlignment="Center"/>
            </Grid>
            <Popup x:Name="DropDownPopup" VerticalOffset="-1" AllowsTransparency="True" StaysOpen="True" Focusable="False">
                <Border x:Name="DropDownPopupBorder">
                    <ContentControl x:Name="DropDownPopupContent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{TemplateBinding DropDownContent}"/>
                </Border>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonApplicationDropDownButtonStyle" TargetType="telerikRibbonViewPrimitives:RadRibbonApplicationDropDownButton">
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Foreground" Value="{StaticResource ApplicationButtonType2010_Foreground}"/>
        <Setter Property="Background" Value="{StaticResource ApplicationButtonType2010_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ApplicationButtonType2010_OuterBorder}"/>
        <Setter Property="BorderThickness" Value="1 1 1 0"/>
        <Setter Property="Margin" Value="1 0 0 0"/>
        <Setter Property="MinWidth" Value="46"/>
        <Setter Property="DropDownPlacement" Value="Relative"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="DropDownIndicatorVisibility" Value="Collapsed"/>
        <Setter Property="IsAutoSize" Value="False"/>
        <Setter Property="Template" Value="{StaticResource ApplicationDropDownButtonTemplate}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style BasedOn="{StaticResource RadRibbonApplicationDropDownButtonStyle}" TargetType="telerikRibbonViewPrimitives:RadRibbonApplicationDropDownButton"/>
    <Style x:Key="RadGalleryStyle" TargetType="telerikRibbonView:RadGallery">
        <Setter Property="ItemWidth" Value="156"/>
        <Setter Property="ItemHeight" Value="26"/>
        <Setter Property="ViewportWidth" Value="157"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerik:RadWrapPanel ItemWidth="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikRibbonView:RadRibbonGallery}}, Path=ItemWidth}" ItemHeight="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikRibbonView:RadRibbonGallery}}, Path=ItemHeight}"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikRibbonView:RadGallery">
                    <ScrollViewer x:Name="PART_ScrollViewer" Padding="0" VerticalAlignment="Stretch" IsTabStop="False" BorderThickness="0">
                        <ItemsPresenter Width="{TemplateBinding ViewportWidth}" HorizontalAlignment="Left"/>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikRibbonView:RadGallery" BasedOn="{StaticResource RadGalleryStyle}"/>
    <ControlTemplate x:Key="RadGalleryItemTemplate" TargetType="telerikRibbonView:RadGalleryItem">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadGalleryItemOver_background}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="SelectedMouseOver"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Unselected"/>
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background_Selected"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="HeaderStates">
                    <VisualState x:Name="IsNotHeader"/>
                    <VisualState x:Name="IsHeader">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Header_Background"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentControl" Storyboard.TargetProperty="HorizontalAlignment">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <HorizontalAlignment>Left</HorizontalAlignment>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="contentControl" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonGalleryHeaderForeground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>5 0 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="KeyboardNavigationVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Header_Background"
                    Opacity="0"
                    Background="{StaticResource RibbonGalleryHeaderBackground}"
                    BorderBrush="{StaticResource RibbonGalleryHeaderBorderBrush}"
                    BorderThickness="{StaticResource RibbonGalleryHeaderBorderThickness}"/>
            <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="1">
                <Grid Margin="{TemplateBinding Padding}">
                    <ContentControl x:Name="contentControl"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Content="{TemplateBinding Content}"
                            IsTabStop="False"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Foreground="{TemplateBinding Foreground}"
                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                    <Image x:Name="Image"
                            Stretch="None"
                            Source="{TemplateBinding Image}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </Grid>
            </Border>
            <Border x:Name="Background_Selected"
                    Opacity="0"
                    Background="{x:Null}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{StaticResource RadGalleryItemPressed_background}"
                    Margin="1"/>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{StaticResource RadGalleryItemOver_background}"
                    Margin="1"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadGalleryItemStyle" TargetType="telerikRibbonView:RadGalleryItem">
        <Setter Property="Template" Value="{StaticResource RadGalleryItemTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <c:if Condition="WPF">
            <Setter Property="Focusable" Value="False"/>
        </c:if>
        <Setter Property="BorderThickness" Value="5"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadGalleryItem" BasedOn="{StaticResource RadGalleryItemStyle}"/>
    <ControlTemplate x:Key="RadRibbonGalleryTemplate" TargetType="telerikRibbonView:RadRibbonGallery">
        <Grid>
            <Border x:Name="ExpandedBorder"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="0 1 1 0">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="14"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <ScrollViewer x:Name="ScrollViewer" Grid.RowSpan="3" VerticalScrollBarVisibility="Hidden" IsTabStop="False" BorderThickness="0" VerticalAlignment="Stretch" Padding="1 1 1 0">
                        <ContentPresenter x:Name="InRibbonHost" Width="{TemplateBinding ViewportWidth}" HorizontalAlignment="Left">
                            <ContentPresenter.Content>
                                <ItemsPresenter x:Name="ItemsPresenter"/>
                            </ContentPresenter.Content>
                        </ContentPresenter>
                    </ScrollViewer>
                    <telerikRibbonView:RadRibbonButton x:Name="ScrollUpButton"
                            telerikRibbonView:ScreenTip.Title="{TemplateBinding UpDownButtonTitle}"
                            CornerRadius="0 1 0 0"
                            HorizontalAlignment="Stretch"
                            Grid.Column="1"
                            Grid.Row="0"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            IsTabStop="False"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            VerticalContentAlignment="Center"
                            Padding="0"
                            Margin="-1 -1 -1 0"
                            Background="{StaticResource RibbonGalleryItemBackgroundBrush}">
                        <Path
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Fill="{StaticResource RibbonGroupButtonArrow}"
                                Data="M 0,4 L4,0 L 8,4"
                                Stroke="{StaticResource RibbonGroupButtonArrowHighlight}"/>
                    </telerikRibbonView:RadRibbonButton>
                    <telerikRibbonView:RadRibbonButton x:Name="ScrollDownButton"
                            telerikRibbonView:ScreenTip.Title="{TemplateBinding UpDownButtonTitle}"
                            CornerRadius="0"
                            HorizontalAlignment="Stretch"
                            Grid.Column="1"
                            Grid.Row="1"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            IsTabStop="False"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            VerticalContentAlignment="Center"
                            Padding="0"
                            Margin="-1 0 -1 0"
                            Background="{StaticResource RibbonGalleryItemBackgroundBrush}">
                        <Path
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Fill="{StaticResource RibbonGroupButtonArrow}"
                                Data="M0,0 L8,0 4,4z"
                                Stroke="{StaticResource RibbonGroupButtonArrowHighlight}"/>
                    </telerikRibbonView:RadRibbonButton>
                    <telerikRibbonView:RadRibbonDropDownButton x:Name="PopupButton"
                            telerikRibbonView:ScreenTip.Title="{TemplateBinding MoreButtonTitle}"
                            HorizontalAlignment="Stretch"
                            DropDownIndicatorVisibility="Collapsed"
                            VerticalContentAlignment="Center"
                            CornerRadius="0 0 1 0"
                            Visibility="{TemplateBinding PopupLaunchButtonVisibility}"
                            Grid.Column="1"
                            Grid.Row="2"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="0"
                            Margin="-1 0 -1 0"
                            Background="{StaticResource RibbonGalleryItemBackgroundBrush}">
                        <Path
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Stretch="None"
                                Fill="{StaticResource RibbonGroupButtonArrow}"
                                Data="M0,0 L0,1 L6,1 L6,0 M0,2 L3,6 L6,2"
                                Margin="0 2 0 0"
                                Stroke="{StaticResource RibbonGroupButtonArrowHighlight}"/>
                    </telerikRibbonView:RadRibbonDropDownButton>
                </Grid>
            </Border>
            <telerikRibbonView:RadRibbonDropDownButton x:Name="CollapsedButton" Size="Large" LargeImage="{TemplateBinding Icon}" Text="{TemplateBinding Title}" Visibility="Collapsed">
                <telerikRibbonView:RadRibbonDropDownButton.DropDownContent>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <ScrollViewer
                                Padding="0"
                                HorizontalScrollBarVisibility="Hidden"
                                IsTabStop="False"
                                Height="{TemplateBinding PopupViewportHeight}"
                                VerticalScrollBarVisibility="Visible"
                                Margin="0 0 -1 -2"
                                BorderThickness="0 0 0 1">
                            <ContentPresenter x:Name="PopupHost" Width="{TemplateBinding PopupViewportWidth}"/>
                        </ScrollViewer>
                        <ItemsControl
                                HorizontalContentAlignment="Stretch"
                                Grid.Row="1"
                                ItemsSource="{TemplateBinding PopupMenuItems}"
                                Foreground="{TemplateBinding Foreground}"
                                BorderThickness="0"
                                Margin="0 2 0 0"/>
                    </Grid>
                </telerikRibbonView:RadRibbonDropDownButton.DropDownContent>
            </telerikRibbonView:RadRibbonDropDownButton>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonGalleryStyle" TargetType="telerikRibbonView:RadRibbonGallery">
        <Setter Property="Template" Value="{StaticResource RadRibbonGalleryTemplate}"/>
        <Setter Property="Background" Value="{StaticResource RibbonGalleryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RibbonGalleryBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
        <Setter Property="PopupViewportWidth" Value="241"/>
        <Setter Property="ViewportWidth" Value="240"/>
        <Setter Property="ItemWidth" Value="80"/>
        <Setter Property="ItemHeight" Value="63"/>
        <Setter Property="PopupLaunchButtonVisibility" Value="Visible"/>
        <Setter Property="Icon">
            <Setter.Value>
                <BitmapImage UriSource="pack://application:,,,/Telerik.Windows.Controls.RibbonView;component/RibbonGalleryCollapsedIcon.png"/>
            </Setter.Value>
        </Setter>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerik:RadWrapPanel ItemWidth="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikRibbonView:RadRibbonGallery}}, Path=ItemWidth}" ItemHeight="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikRibbonView:RadRibbonGallery}}, Path=ItemHeight}"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonGallery" BasedOn="{StaticResource RadRibbonGalleryStyle}"/>
    <ItemsPanelTemplate x:Key="ButtonGroupPanel">
        <telerikRibbonViewPrimitives:ButtonGroupPanel/>
    </ItemsPanelTemplate>
    <Style x:Key="RadButtonGroupStyle" TargetType="telerikRibbonView:RadButtonGroup">
        <Setter Property="Padding" Value="1 0"/>
        <Setter Property="Background" Value="{StaticResource ButtonGroupBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonGroupOuterBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="ItemsPanel" Value="{StaticResource ButtonGroupPanel}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikRibbonView:RadButtonGroup">
                    <Grid>
                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                            <Border BorderBrush="{StaticResource ButtonGroupInnerBorderBrush}" BorderThickness="1" CornerRadius="1"/>
                        </Border>
                        <ItemsPresenter Margin="{TemplateBinding Padding}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadButtonGroupItemTemplate" TargetType="telerikRibbonView:RadButtonGroupItem">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CollectionOrderStates">
                    <VisualState x:Name="FirstContainer"/>
                    <VisualState x:Name="DefaultContainer">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonItemsSeparator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <StackPanel Orientation="Horizontal">
                <Border x:Name="ButtonItemsSeparator" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"/>
                <ContentControl
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        IsTabStop="False"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
            </StackPanel>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadButtonGroupItemStyle" TargetType="telerikRibbonView:RadButtonGroupItem">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="1 0 0 0"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonGroupDividerLightBrush}"/>
        <Setter Property="Template" Value="{StaticResource RadButtonGroupItemTemplate}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadButtonGroup" BasedOn="{StaticResource RadButtonGroupStyle}"/>
    <Style TargetType="telerikRibbonView:RadButtonGroupItem" BasedOn="{StaticResource RadButtonGroupItemStyle}"/>
    <ControlTemplate x:Key="GroupChromeTemplate" TargetType="telerikRibbonViewPrimitives:GroupChrome">
        <Grid Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Border BorderBrush="{StaticResource GroupChrome_OuterBorderBrush}" Grid.RowSpan="2" BorderThickness="0 0 1 1" CornerRadius="2"/>
            <Border
                    Grid.RowSpan="2"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    Margin="0 0 1 1"
                    CornerRadius="2"/>
            <Grid x:Name="Tray" Grid.Row="1" Margin="1 0 2 2" Background="{StaticResource GroupChrome_TrayBackground}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <ContentControl
                        Content="{TemplateBinding Header}"
                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        IsTabStop="False"
                        Margin="3 0"
                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                        Foreground="{StaticResource RibbonGroupHeaderBrush}"/>
                <telerikRibbonView:RadRibbonButton
                        MinHeight="0"
                        MinWidth="0"
                        Visibility="{TemplateBinding DialogLauncherVisibility}"
                        x:Name="DialogLauncher"
                        Grid.Column="1"
                        IsAutoSize="False"
                        TabIndex="1"
                        IsTabStop="False"
                        Command="{TemplateBinding DialogLauncherCommand}"
                        CommandParameter="{TemplateBinding DialogLauncherCommandParameter}"
                        CommandTarget="{TemplateBinding DialogLauncherCommandTarget}"
                        Margin="1"
                        Width="15"
                        Height="14">
                    <telerikRibbonView:RadRibbonButton.Content>
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="8" Height="8">
                            <Path Fill="{StaticResource DialogLauncher_Fill1}" Data="M6,3 L7,3 L7,6 L7,7 L3,7 L3,6 L6,6 z M3,3 L4,3 L4,4 L6,4 L6,6 L4,6 L4,4 L3,4 z M0,0 L1,0 L6,0 L6,1 L1,1 L1,6 L0,6 L0,1 z" Margin="0 0 1 1"/>
                            <Path Margin="1 1 0 0" Data="M6,2 L7,2 L7,6 L7,7 L3,7 L3,6 L6,6 z M3,2 L4,2 L4,3 L3,3 z M0,0 L1,0 L5,0 L5,1 L1,1 L1,5 L0,5 L0,1 z" Fill="{StaticResource DialogLauncher_Fill2}"/>
                        </Grid>
                    </telerikRibbonView:RadRibbonButton.Content>
                </telerikRibbonView:RadRibbonButton>
            </Grid>
            <ContentPresenter Margin="{TemplateBinding Padding}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="GroupChromeStyle" TargetType="telerikRibbonViewPrimitives:GroupChrome">
        <Setter Property="Template" Value="{StaticResource GroupChromeTemplate}"/>
        <Setter Property="Foreground" Value="{StaticResource RibbonGroupHeaderBrush}"/>
        <Setter Property="Background" Value="{StaticResource GroupChrome_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GroupChrome_BorderBrush}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="telerikRibbonViewPrimitives:GroupChrome" BasedOn="{StaticResource GroupChromeStyle}"/>
    <ControlTemplate x:Key="RadGroupHeaderTemplate" TargetType="telerikRibbonView:RadGroupHeader">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <ContentControl
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Margin="{TemplateBinding Padding}"
                    Foreground="{TemplateBinding Foreground}"
                    IsTabStop="False"/>
        </Border>
    </ControlTemplate>
    <Style x:Key="RadGroupHeaderStyle" TargetType="telerikRibbonView:RadGroupHeader">
        <Setter Property="Template" Value="{StaticResource RadGroupHeaderTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GroupHeaderBackgroundBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource RibbonPopupForegroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GroupHeaderBorderBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 0 1"/>
        <Setter Property="Padding" Value="11 4 5 5"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadGroupHeader" BasedOn="{StaticResource RadGroupHeaderStyle}"/>
    <ControlTemplate x:Key="RadRibbonGroupDropDownButtonTemplate" TargetType="telerikRibbonView:RadRibbonDropDownButton">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverVisual" To="1"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PressedVisual" To="1"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard Duration="0">
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusState">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="IsOpenState">
                    <VisualState x:Name="Closed">
                        <Storyboard/>
                    </VisualState>
                    <VisualState x:Name="Opened">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PressedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownButtonPositionState">
                    <VisualState x:Name="DropDownButtonAtTop"/>
                    <VisualState x:Name="DropDownButtonAtLeft"/>
                    <VisualState x:Name="DropDownButtonAtBottom"/>
                    <VisualState x:Name="DropDownButtonAtRight">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.Column)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>3</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="(Grid.Row)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>0</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPanel" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>2 0 0 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Image" Storyboard.TargetProperty="(Grid.RowSpan)">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Int32>2</sys:Int32>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownPlacementState">
                    <VisualState x:Name="PlacementBottom"/>
                    <VisualState x:Name="PlacementTop"/>
                    <VisualState x:Name="PlacementLeft"/>
                    <VisualState x:Name="PlacementRight"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownContentState">
                    <VisualState x:Name="HasDropDownContent"/>
                    <VisualState x:Name="WithoutDropDownContent">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DropDownIndicator">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropShadowVisibilityState">
                    <VisualState x:Name="HasShadow"/>
                    <VisualState x:Name="WithoutShadow"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="KeyboardNavigationVisual" To="1"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="NormalVisual"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="2">
                <Border BorderBrush="{StaticResource RadRibbonGroupNormalBorderInner}" BorderThickness="1" CornerRadius="1"/>
            </Border>
            <Border x:Name="MouseOverVisual"
                    Opacity="0"
                    Background="{StaticResource RadRibbonGroupOverBackground}"
                    BorderBrush="{StaticResource RadRibbonGroupOverBorder}"
                    BorderThickness="1"
                    CornerRadius="2">
                <Border BorderBrush="{StaticResource RadRibbonGroupOverBorderInner}" BorderThickness="1" CornerRadius="1"/>
            </Border>
            <Border x:Name="PressedVisual"
                    Opacity="0"
                    Background="{StaticResource RadRibbonGroupPressedBackground}"
                    BorderBrush="{StaticResource RadRibbonGroupPressedBorder}"
                    BorderThickness="1"
                    CornerRadius="2">
                <Border BorderBrush="{StaticResource RadRibbonGroupPressedBorderInner}" BorderThickness="1" CornerRadius="1"/>
            </Border>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    Background="{StaticResource RadRibbonGroupOverBackground}"
                    BorderBrush="{StaticResource RadRibbonGroupOverBorder}"
                    BorderThickness="1"
                    CornerRadius="2">
                <Border BorderBrush="{StaticResource RadRibbonGroupOverBorderInner}" BorderThickness="1" CornerRadius="1"/>
            </Border>
            <Grid Margin="{TemplateBinding Padding}" x:Name="ContentGrid" VerticalAlignment="Center">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <ContentPresenter x:Name="ContentPresenter"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        RecognizesAccessKey="True"/>
                <Border x:Name="Image"
                        Margin="3"
                        Background="{StaticResource RibbonGroupButtonBackgroundBrush}"
                        BorderBrush="{StaticResource RibbonGroupButtonBorderBrush}"
                        BorderThickness="1"
                        CornerRadius="4"
                        Width="31"
                        Height="31">
                    <Grid>
                        <Border VerticalAlignment="Bottom" Height="7" CornerRadius="0 0 3 3" Background="{StaticResource RibbonGroupButtonBottomBrush}"/>
                        <Image VerticalAlignment="Center" HorizontalAlignment="Center" Source="{TemplateBinding SmallImage}" Stretch="None" Margin="0 0 0 7" Width="16" Height="16"/>
                    </Grid>
                </Border>
                <TextBlock Name="textRow1" Grid.Row="1" Text="{TemplateBinding TextRow1}" TextAlignment="Center" Foreground="{TemplateBinding Foreground}"/>
                <StackPanel Name="DropDownPanel" Grid.Row="2" HorizontalAlignment="Center" Orientation="Horizontal">
                    <TextBlock Name="textRow2" Text="{TemplateBinding TextRow2}" Foreground="{TemplateBinding Foreground}"/>
                    <Path
                            Name="DropDownIndicator"
                            IsHitTestVisible="False"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Margin="2"
                            VerticalAlignment="Top"
                            HorizontalAlignment="Center"
                            Fill="{StaticResource RibbonButtonDropDownFill}"
                            Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z"
                            SnapsToDevicePixels="True"/>
                </StackPanel>
            </Grid>
            <Popup x:Name="DropDownPopup"
                    AllowsTransparency="True"
                    StaysOpen="False"
                    Focusable="False"
                    Placement="Bottom"
                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                <Grid>
                    <Border x:Name="DropDownPopupBorder"
                            Padding="0"
                            Margin="0"
                            MinWidth="3"
                            MinHeight="3"
                            Width="{TemplateBinding DropDownWidth}"
                            Height="{TemplateBinding DropDownHeight}"
                            MaxWidth="{TemplateBinding DropDownMaxWidth}"
                            MaxHeight="{TemplateBinding DropDownMaxHeight}"
                            Background="{StaticResource DropDownPopupBackgroundBrush}"
                            BorderBrush="{StaticResource DropDownPopupBorderBrush}"
                            BorderThickness="0">
                        <ContentControl x:Name="DropDownPopupContent"
                                Content="{TemplateBinding DropDownContent}"
                                ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonGroupDropDownButtonStyle" TargetType="telerikRibbonView:RadRibbonDropDownButton">
        <Setter Property="Template" Value="{StaticResource RadRibbonGroupDropDownButtonTemplate}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="DropDownButtonPosition" Value="Bottom"/>
        <Setter Property="Background" Value="{StaticResource RibbonGroupButtonBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RibbonGroupButtonBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="3 1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="SeparatorStyle" TargetType="telerikRibbonView:Separator">
        <Setter Property="Background" Value="{StaticResource RibbonGroupSeparatorLightBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RibbonGroupButtonBorderBrush}"/>
        <Setter Property="Width" Value="2"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Margin" Value="0 5 0 6"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikRibbonView:Separator">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ItemsPanelTemplate x:Key="RadRibbonGroupPanelTemplate">
        <telerikRibbonViewPrimitives:RibbonButtonsPanel/>
    </ItemsPanelTemplate>
    <ControlTemplate x:Key="RadRibbonGroupTemplate" TargetType="telerikRibbonView:RadRibbonGroup">
        <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="SizeState">
                    <VisualState x:Name="Expanded"/>
                    <VisualState x:Name="Collapsed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CollapsedButton" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CollapsedGroup">
                    <VisualState x:Name="CollapsedGroupNormal"/>
                    <VisualState x:Name="CollapsedGroupPushed"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <telerikRibbonViewPrimitives:GroupChrome x:Name="ExpandedChrome"
                    Foreground="{TemplateBinding Foreground}"
                    DialogLauncherCommand="{TemplateBinding DialogLauncherCommand}"
                    DialogLauncherCommandParameter="{TemplateBinding DialogLauncherCommandParameter}"
                    DialogLauncherCommandTarget="{TemplateBinding DialogLauncherCommandTarget}"
                    Header="{TemplateBinding Header}"
                    HeaderTemplate="{TemplateBinding HeaderTemplate}"
                    DialogLauncherVisibility="{TemplateBinding DialogLauncherVisibility}"
                    IsTabStop="False"
                    HeaderStringFormat="{TemplateBinding HeaderStringFormat}">
                <ItemsPresenter Name="ItemsPresenter"/>
            </telerikRibbonViewPrimitives:GroupChrome>
            <telerikRibbonView:RadRibbonDropDownButton x:Name="CollapsedButton"
                    Visibility="Collapsed"
                    Style="{StaticResource RadRibbonGroupDropDownButtonStyle}"
                    SplitText="False"
                    SmallImage="{TemplateBinding Icon}"
                    Size="Large"
                    Text="{TemplateBinding Header}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonGroupStyle" TargetType="telerikRibbonView:RadRibbonGroup">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Foreground" Value="{StaticResource RibbonForegroundBrush}"/>
        <Setter Property="SeparatorStyle" Value="{StaticResource SeparatorStyle}"/>
        <Setter Property="ItemsPanel" Value="{StaticResource RadRibbonGroupPanelTemplate}"/>
        <Setter Property="Icon">
            <Setter.Value>
                <BitmapImage UriSource="pack://application:,,,/Telerik.Windows.Controls.RibbonView;component/RibbonGroupCollapsedIcon.png"/>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource RadRibbonGroupTemplate}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonGroup" BasedOn="{StaticResource RadRibbonGroupStyle}"/>
    <ControlTemplate x:Key="ApplicationRibbonButtonTemplate" TargetType="telerikRibbonView:RadRibbonButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBorder}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonInnerBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBorderInner}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBorder}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonInnerBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBorderInner}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard Duration="0">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Disabled" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="TextAlignment">
                    <VisualState x:Name="TextHide">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ButtonBackground"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="1">
                <Border x:Name="ButtonInnerBackground" BorderBrush="Transparent" BorderThickness="1"/>
            </Border>
            <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <ContentPresenter x:Name="Content"
                        Margin="{TemplateBinding Padding}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        RecognizesAccessKey="True"
                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                        ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                <Image x:Name="Image"/>
                <TextBlock x:Name="textRow1" Grid.Column="1" Text="{TemplateBinding Text}" TextAlignment="Left" VerticalAlignment="Center" Margin="4 9 1 9"/>
            </Grid>
            <Rectangle x:Name="Background_Disabled" Visibility="Collapsed" Fill="#99FFFFFF"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ApplicationRibbonButton" TargetType="telerikRibbonView:RadRibbonButton">
        <Setter Property="Padding" Value="5"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Size" Value="Large"/>
        <Setter Property="Template" Value="{StaticResource ApplicationRibbonButtonTemplate}"/>
    </Style>
    <ControlTemplate x:Key="ApplicationRibbonDropDownButtonTemplate" TargetType="telerikRibbonView:RadRibbonDropDownButton">
        <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBorder}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonInnerBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBorderInner}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBorder}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonInnerBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBorderInner}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard Duration="0">
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Disabled" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused"/>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="TextAlignment">
                    <VisualState x:Name="TextHide">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="IsOpenState">
                    <VisualState x:Name="Closed"/>
                    <VisualState x:Name="Opened">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="isOpenIndicator" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SplitState"/>
                <VisualStateGroup x:Name="DropDownContentStates">
                    <VisualState x:Name="HasDropDownContent"/>
                    <VisualState x:Name="WithoutDropDownContent">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DropDownPanel">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ButtonBackground"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="1">
                <Border x:Name="ButtonInnerBackground" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Border x:Name="isOpenIndicator"
                    Visibility="Collapsed"
                    CornerRadius="1"
                    BorderThickness="1"
                    BorderBrush="{StaticResource ApplicationRibbonButtonOverBorder}"
                    Background="{StaticResource ApplicationRibbonButtonOverBackground}">
                <Border BorderBrush="{StaticResource ApplicationRibbonButtonOverBorderInner}" BorderThickness="{TemplateBinding BorderThickness}"/>
            </Border>
            <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="24"/>
                </Grid.ColumnDefinitions>
                <ContentControl
                        Grid.ColumnSpan="3"
                        x:Name="ContentPresenter"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"/>
                <Image x:Name="Image"/>
                <TextBlock x:Name="textRow1" Grid.Column="1" Text="{TemplateBinding Text}" TextAlignment="Left" VerticalAlignment="Center" Margin="8 7 1 7"/>
                <Grid x:Name="DropDownPanel" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2 0 0 0">
                    <Path x:Name="DropDownIndicator"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Fill="{StaticResource RibbonButtonDropDownArrow}"
                            Data="M 0,0 L 3.5,3.5 L 0,7"
                            Stroke="{StaticResource RibbonButtonDropDownArrowBorder}"/>
                </Grid>
            </Grid>
            <Popup x:Name="DropDownPopup"
                    HorizontalOffset="1"
                    VerticalOffset="-1"
                    AllowsTransparency="True"
                    StaysOpen="False"
                    Focusable="False"
                    Placement="Bottom"
                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                <Grid>
                    <Border x:Name="DropDownPopupBorder"
                            Width="{TemplateBinding DropDownWidth}"
                            Height="{TemplateBinding DropDownHeight}"
                            Background="{StaticResource DropDownPopupBackgroundBrush}"
                            BorderBrush="{StaticResource DropDownPopupBorderBrush}"
                            BorderThickness="1">
                        <ContentControl x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                    </Border>
                </Grid>
            </Popup>
            <Rectangle x:Name="Background_Disabled" Visibility="Collapsed" Fill="#99FFFFFF"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ApplicationRibbonDropDownButton" TargetType="telerikRibbonView:RadRibbonDropDownButton">
        <Setter Property="Padding" Value="5"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="AutoOpenDelay" Value="0:0:0.3"/>
        <Setter Property="Template" Value="{StaticResource ApplicationRibbonDropDownButtonTemplate}"/>
    </Style>
    <ControlTemplate x:Key="ApplicationRibbonSplitButtonTemplate" TargetType="telerikRibbonView:RadRibbonSplitButton">
        <Grid SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="BorderThickness">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationRibbonButtonOverBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Storyboard.TargetName="mouseOverDecorator" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SeparatorPart" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="disabledDecorator" Storyboard.TargetProperty="Opacity" Duration="0" To="0.55"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="disabledDecorator" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="IsOpenState">
                    <VisualState x:Name="Closed"/>
                    <VisualState x:Name="Opened">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonPressedBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Storyboard.TargetName="mouseOverDecorator" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SeparatorPart" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="DropDownContentState">
                    <VisualState x:Name="HasDropDownContent"/>
                    <VisualState x:Name="WithoutDropDownContent">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DropDownPanel">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="backgroundDecorator"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="1">
                <Border x:Name="backgroundDecoratorInner" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="Transparent"/>
            </Border>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton x:Name="ButtonPart"
                        Grid.ColumnSpan="2"
                        Background="Transparent"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                        Padding="{TemplateBinding Padding}"/>
                <telerik:RadToggleButton x:Name="DropDownPart"
                        Grid.Column="2"
                        Margin="0"
                        Background="Transparent"
                        Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                        IsTabStop="false"
                        IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                <Rectangle x:Name="SeparatorPart"
                        Grid.ColumnSpan="2"
                        MinWidth="1"
                        MinHeight="1"
                        Visibility="Collapsed"
                        IsHitTestVisible="False"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Stretch"
                        Fill="{StaticResource RadRibbonBarDropDownButtonPressedBorder}"/>
                <Image x:Name="Image" IsHitTestVisible="False" Margin="4"/>
                <TextBlock x:Name="textRow1" Grid.Column="1" IsHitTestVisible="False" Text="{TemplateBinding Text}" TextAlignment="Left" VerticalAlignment="Center" Margin="12 11 1 11"/>
                <Grid x:Name="DropDownPanel" Grid.Column="2" Width="22" IsHitTestVisible="False">
                    <Path x:Name="DropDownIndicator"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            IsHitTestVisible="False"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Fill="{StaticResource RibbonButtonDropDownArrow}"
                            Data="M 0,0 L 3.5,3.5 L 0,7"
                            Stroke="{StaticResource RibbonButtonDropDownArrowBorder}"/>
                </Grid>
            </Grid>
            <Border x:Name="mouseOverDecorator"
                    Opacity="0"
                    Background="{x:Null}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}"
                    CornerRadius="2"/>
            <Popup x:Name="DropDownPopup"
                    HorizontalOffset="1"
                    VerticalOffset="-1"
                    AllowsTransparency="True"
                    StaysOpen="False"
                    Focusable="False"
                    Placement="Bottom"
                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                <Grid>
                    <Border x:Name="DropDownPopupBorder"
                            MinWidth="3"
                            MinHeight="3"
                            Width="{TemplateBinding DropDownWidth}"
                            Height="{TemplateBinding DropDownHeight}"
                            Background="{StaticResource DropDownPopupBackgroundBrush}"
                            BorderBrush="{StaticResource DropDownPopupBorderBrush}"
                            BorderThickness="1">
                        <ContentControl x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                    </Border>
                </Grid>
            </Popup>
            <Rectangle x:Name="disabledDecorator" Visibility="Collapsed" Opacity="0" Fill="#FFFFFFFF"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ApplicationRibbonSplitButton" TargetType="telerikRibbonView:RadRibbonSplitButton">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="AutoOpenDelay" Value="0:0:0.3"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="DropDownPlacement" Value="Relative"/>
        <Setter Property="Size" Value="Large"/>
        <Setter Property="Template" Value="{StaticResource ApplicationRibbonSplitButtonTemplate}"/>
    </Style>
    <Style x:Key="ApplicationSeparatorStyle" TargetType="telerikRibbonView:Separator">
        <Setter Property="BorderBrush" Value="{StaticResource ApplicationMenu_OuterBorder}"/>
        <Setter Property="Margin" Value="0 1"/>
        <Setter Property="BorderThickness" Value="0 1 0 0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikRibbonView:Separator">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="ApplicationMenuTemplate" TargetType="telerikRibbonView:ApplicationMenu">
        <Grid>
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border x:Name="clippingRectangle" Background="{StaticResource ApplicationMenu_ClippingRectangleFill}" MinHeight="24"/>
                    <Rectangle x:Name="buttonRectangle" HorizontalAlignment="Left" Fill="Transparent" MinHeight="24"/>
                    <Border BorderThickness="0 1 0 0" BorderBrush="{StaticResource ApplicationMenu_OuterBorder}" Grid.ColumnSpan="3" VerticalAlignment="Bottom"/>
                    <Grid Grid.Row="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="LeftPane" MinWidth="164" Padding="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 0 1 0">
                            <ItemsPresenter/>
                        </Border>
                        <Border x:Name="RightPane" Visibility="{TemplateBinding RightPaneVisibility}" Grid.Column="1" Background="{TemplateBinding Background}">
                            <ContentPresenter Content="{TemplateBinding Content}" x:Name="ContentPresenter" MinWidth="125"/>
                        </Border>
                    </Grid>
                    <Border Grid.Row="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1">
                        <ContentPresenter Content="{TemplateBinding FooterContent}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="3"/>
                    </Border>
                </Grid>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ApplicationMenuStyle" TargetType="telerikRibbonView:ApplicationMenu">
        <Setter Property="Template" Value="{StaticResource ApplicationMenuTemplate}"/>
        <Setter Property="Background" Value="{StaticResource ApplicationMenu_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ApplicationMenu_OuterBorder}"/>
        <Setter Property="Foreground" Value="{StaticResource ApplicationMenu_Foreground}"/>
        <Setter Property="BorderThickness" Value="1 0 1 1"/>
        <Setter Property="Margin" Value="0 1 0 0"/>
        <Setter Property="ItemContainerStyleSelector">
            <Setter.Value>
                <telerikRibbonView:CustomContainerStyleSelector>
                    <telerikRibbonView:CustomContainerStyle TypeName="RadRibbonButton" ContainerStyle="{StaticResource ApplicationRibbonButton}"/>
                    <telerikRibbonView:CustomContainerStyle TypeName="RadRibbonDropDownButton" ContainerStyle="{StaticResource ApplicationRibbonDropDownButton}"/>
                    <telerikRibbonView:CustomContainerStyle TypeName="RadRibbonSplitButton" ContainerStyle="{StaticResource ApplicationRibbonSplitButton}"/>
                    <telerikRibbonView:CustomContainerStyle TypeName="Separator" ContainerStyle="{StaticResource ApplicationSeparatorStyle}"/>
                </telerikRibbonView:CustomContainerStyleSelector>
            </Setter.Value>
        </Setter>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="telerikRibbonView:ApplicationMenu" BasedOn="{StaticResource ApplicationMenuStyle}"/>
    <ControlTemplate x:Key="DropShadowTemplate" TargetType="telerikRibbonViewPrimitives:DropShadow">
        <Grid>
            <Rectangle Name="Left" HorizontalAlignment="Left" VerticalAlignment="Stretch" IsHitTestVisible="False"/>
            <Rectangle Name="TopLeft" HorizontalAlignment="Left" VerticalAlignment="Top" IsHitTestVisible="False"/>
            <Rectangle Name="Top" HorizontalAlignment="Stretch" VerticalAlignment="Top" IsHitTestVisible="False"/>
            <Rectangle Name="TopRight" HorizontalAlignment="Right" VerticalAlignment="Top" IsHitTestVisible="False"/>
            <Rectangle Name="Right" HorizontalAlignment="Right" VerticalAlignment="Stretch" IsHitTestVisible="False"/>
            <Rectangle Name="BottomRight" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsHitTestVisible="False"/>
            <Rectangle Name="Bottom" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" IsHitTestVisible="False"/>
            <Rectangle Name="BottomLeft" HorizontalAlignment="Left" VerticalAlignment="Bottom" IsHitTestVisible="False"/>
            <ContentPresenter
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Margin="{TemplateBinding Padding}"/>
        </Grid>
    </ControlTemplate>
    <Style TargetType="telerikRibbonViewPrimitives:DropShadow" x:Key="DropShadowStyle">
        <Setter Property="Template" Value="{StaticResource DropShadowTemplate}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="KeyTipControlTemplate" TargetType="telerikKeyTips:KeyTipControl">
        <Grid>
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1">
                <Border BorderThickness="1" BorderBrush="{StaticResource RibbonBarKeyTips_InnerBorderBrush}"/>
            </Border>
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="KeyTipControlStyle" TargetType="telerikKeyTips:KeyTipControl">
        <Setter Property="Template" Value="{StaticResource KeyTipControlTemplate}"/>
        <Setter Property="Background" Value="{StaticResource RibbonBarKeyTips_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RibbonBarKeyTips_OuterBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="2 -2 2 -1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinWidth" Value="16"/>
        <Setter Property="MinHeight" Value="16"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="ScreenTipTemplate" TargetType="telerikRibbonView:ScreenTip">
        <Grid x:Name="RootElement">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="ContentState">
                    <VisualState x:Name="Title">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Width">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Double>210</sys:Double>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="TitleDescription">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DescriptionPresenter" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Width">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Double>210</sys:Double>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="TitleDescriptionImage">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DescriptionPresenter" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Image" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Width">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <sys:Double>318</sys:Double>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                <Grid Margin="{TemplateBinding Padding}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock x:Name="TitlePresenter" Grid.ColumnSpan="2" Text="{TemplateBinding Title}" Margin="0 0 0 5" TextWrapping="Wrap" FontWeight="Bold"/>
                    <Image x:Name="Image" Grid.Row="1" Source="{TemplateBinding Icon}" Stretch="None" Margin="0 5 10 6" VerticalAlignment="Top" Visibility="Collapsed"/>
                    <TextBlock x:Name="DescriptionPresenter"
                            Grid.Row="1"
                            Grid.Column="1"
                            TextWrapping="Wrap"
                            FontWeight="Normal"
                            Text="{TemplateBinding Description}"
                            VerticalAlignment="Top"
                            Visibility="Collapsed"/>
                </Grid>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ScreenTipStyle" TargetType="telerikRibbonView:ScreenTip">
        <Setter Property="Template" Value="{StaticResource ScreenTipTemplate}"/>
        <Setter Property="Background" Value="{StaticResource QuickAccessKeyHintBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource QuickAccessKeyHintBorderBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource QuickAccessKeyHintForegroundBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="4 2"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="RibbonScrollViewerPathStyle" TargetType="Path">
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Fill" Value="{StaticResource PageScrollViewerButtonForegroundBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <ControlTemplate x:Key="RibbonScrollButtonTemplate" TargetType="RepeatButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PageScrollViewerHotButtonBackgroundBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonHoverOuterBorderBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonHoverInnerBorderBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PageScrollViewerPressedButtonBackgroundBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPushedOuterBorderBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPushedInnerBorderBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="3 0 0 3">
                <Border x:Name="InnerBorder" BorderBrush="{StaticResource PageScrollViewerButtonInnerBorderBrush}" BorderThickness="1" CornerRadius="2 0 0 2"/>
            </Border>
            <Path x:Name="Path"
                    Style="{StaticResource RibbonScrollViewerPathStyle}"
                    Fill="{StaticResource PageScrollViewerButtonForegroundBrush}"
                    Data="F1M3,0L3,5 0,2.5 3,0z"
                    SnapsToDevicePixels="True"
                    FocusVisualStyle="{x:Null}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RibbonScrollButtonStyle" TargetType="RepeatButton">
        <Setter Property="Template" Value="{StaticResource RibbonScrollButtonTemplate}"/>
        <Setter Property="Background" Value="{StaticResource PageScrollViewerButtonBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource PageScrollViewerButtonOuterBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="12"/>
        <Setter Property="Interval" Value="50"/>
    </Style>
    <ControlTemplate x:Key="RibbonScrollViewerTemplate" TargetType="telerikRibbonViewPrimitives:RibbonScrollViewer">
        <Grid>
            <ContentPresenter x:Name="Content" Margin="1 0 1 0"/>
            <Grid x:Name="ButtonsGrid" HorizontalAlignment="Left">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <RepeatButton x:Name="LeftScrollButtonElement" Style="{StaticResource RibbonScrollButtonStyle}"/>
                <RepeatButton x:Name="RightScrollButtonElement" RenderTransformOrigin="0.5 0.5" Grid.Column="2" Style="{StaticResource RibbonScrollButtonStyle}">
                    <RepeatButton.RenderTransform>
                        <ScaleTransform ScaleX="-1"/>
                    </RepeatButton.RenderTransform>
                </RepeatButton>
            </Grid>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RibbonScrollViewerStyle" TargetType="telerikRibbonViewPrimitives:RibbonScrollViewer">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource RibbonScrollViewerTemplate}"/>
    </Style>
    <Style TargetType="telerikRibbonViewPrimitives:DropShadow" BasedOn="{StaticResource DropShadowStyle}"/>
    <Style TargetType="telerikKeyTips:KeyTipControl" BasedOn="{StaticResource KeyTipControlStyle}"/>
    <Style TargetType="telerikRibbonView:ScreenTip" BasedOn="{StaticResource ScreenTipStyle}"/>
    <Style TargetType="telerikRibbonViewPrimitives:RibbonScrollViewer" BasedOn="{StaticResource RibbonScrollViewerStyle}"/>
    <ControlTemplate x:Key="RadRibbonBackstageItemTemplate" TargetType="telerikRibbonView:RadRibbonBackstageItem">
        <Grid x:Name="wrapper" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonnBackStage_Item_BackgroundMouseOVer}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonnBackStage_Item_OuterBorderMouseOVer}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonnBackStage_Item_InnerBorderMouseOVer}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentPanel" To="0.5" Duration="0:0:0.1"/>
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OuterBorder" To="0" Duration="0:0:0.1"/>
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InnerBorder" To="0" Duration="0:0:0.1"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ButtonStates">
                    <VisualState x:Name="ButtonNormal">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPanel" Storyboard.TargetProperty="Margin" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>20 5</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ButtonMouseLeave"/>
                    <VisualState x:Name="ButtonMouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPanel" Storyboard.TargetProperty="Margin" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>20 5</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Margin" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>5 0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>1</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonnBackStage_Item_OuterBorderMouseOVer}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonnBackStage_Item_InnerBorderMouseOVer}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonnBackStage_Item_BackgroundMouseOVer}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="TabItemStates">
                    <VisualState x:Name="TabItemUnSelected"/>
                    <VisualState x:Name="TabItemSelected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedVisualState" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="path" Storyboard.TargetProperty="Visibility" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="Foreground" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RibbonBackstage_Item_ForegroundSelected}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="TabItemMouseOver"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Name="OuterBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="0 1" Margin="0 0 1 0">
                <Border Name="InnerBorder" BorderBrush="Transparent" BorderThickness="0 1"/>
            </Border>
            <Grid x:Name="SelectedVisualState" Visibility="Collapsed">
                <Rectangle Fill="{StaticResource RibbonnBackStage_Item_OuterBackgroundSelected}" Stroke="{StaticResource RibbonnBackStage_Item_OuterBorderSelected}"/>
                <Border BorderThickness="0" Margin="0 0 0 -1" Background="{StaticResource RibbonnBackStage_Item_InnerBackgroundSelected}">
                    <Rectangle Fill="{StaticResource RibbonnBackStage_Item_InnerBorderSelected}"/>
                </Border>
            </Grid>
            <StackPanel Orientation="Horizontal" x:Name="ContentPanel" Margin="20 10">
                <Image x:Name="Image" Source="{TemplateBinding Icon}" MaxWidth="16" MaxHeight="16" Stretch="Fill" Margin="0 0 5 0" Visibility="Collapsed"/>
                <ContentControl x:Name="HeaderElement"
                        Content="{TemplateBinding Header}"
                        IsTabStop="False"
                        Foreground="{TemplateBinding HeaderForeground}"
                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                        SnapsToDevicePixels="True"
                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"/>
            </StackPanel>
            <Path
                    Name="path"
                    Data="M129.5,9.2 L129.5,24.2 L121.5,16.4 z"
                    Fill="{StaticResource RibbonnBackStage_ArrowBackground}"
                    HorizontalAlignment="Right"
                    Height="15"
                    Margin="0 0 -1 0"
                    StrokeStartLineCap="Flat"
                    Stretch="Fill"
                    StrokeEndLineCap="Flat"
                    StrokeThickness="1"
                    StrokeMiterLimit="10"
                    StrokeLineJoin="Miter"
                    VerticalAlignment="Center"
                    Width="8"
                    Visibility="Collapsed"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonBackstageItemStyle" TargetType="telerikRibbonView:RadRibbonBackstageItem">
        <Setter Property="Template" Value="{StaticResource RadRibbonBackstageItemTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Foreground" Value="{StaticResource RibbonBackstage_Item_Foreground}"/>
        <Setter Property="HeaderForeground" Value="{StaticResource RibbonBackstage_Item_HeaderForeground}"/>
        <Setter Property="Margin" Value="0 1"/>
        <Setter Property="MinWidth" Value="5"/>
        <Setter Property="MinHeight" Value="5"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <ControlTemplate x:Key="TabControlTemplate" TargetType="telerikNavigation:RadTabControl">
        <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" Padding="-1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Border Grid.ColumnSpan="2" Background="{StaticResource RibbonnBackStage_TopLine}" Height="2"/>
                <Grid Grid.Row="1">
                    <Border x:Name="HeaderBackground"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding HeaderBackground}"
                            Visibility="{TemplateBinding BackgroundVisibility}"/>
                    <Border BorderThickness="0 0 1 0" HorizontalAlignment="Right" Background="{StaticResource RibbonnBackStage_BorderBrushRight}" Width="5" SnapsToDevicePixels="True"/>
                    <ItemsPresenter x:Name="ItemsPresenter" Margin="0 4 0 0"/>
                </Grid>
                <Grid x:Name="ContentBorder" Grid.Column="1" Grid.Row="1" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
                    <Grid x:Name="Corner_Offices" Height="163" Margin="0 0 0 -4" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="363">
                        <Rectangle Margin="38 0 1 5" Height="158" Fill="{StaticResource RibbonnBackStage_CornerBackground}"/>
                        <Path
                                Fill="{StaticResource RibbonnBackStage_CornerPath1}"
                                Margin="49.99,0.296,0.553,4.703"
                                Stretch="Fill"
                                Data="M1123.5387,485.33307 C1123.5387,485.33307 1095.134,532.02374 999.00061,582.00073 C962.78992,600.82568 924.71429,614.0885 924.71429,614.0885 C924.71429,614.0885 841.09241,640.33337 811.10925,642.76489 C807.72156,643.03961 1123.3203,643.33423 1123.3203,643.33423 z"/>
                        <Path
                                Fill="{StaticResource RibbonnBackStage_CornerPath2}"
                                Margin="72.005,31.979,0.771,4.488"
                                Stretch="Fill"
                                StrokeThickness="2"
                                Data="M1123.2728,516.80042 C1123.2728,516.80042 1077.7751,561.80066 1000.5497,595.66058 C963.17285,612.04865 920.97644,624.45093 920.97644,624.45093 C920.97644,624.45093 863.08844,639.87512 833.10913,642.76489 C831.05566,642.96283 1123.3203,643.33423 1123.3203,643.33423 z"/>
                        <Path
                                Fill="{StaticResource RibbonnBackStage_CornerPath3}"
                                Margin="71.332,61.012,0.553,4.551"
                                Stretch="Fill"
                                Data="M1123.5387,525.33331 C1123.5387,525.33331 1077.2158,571.32648 1001.8666,601.20764 C963.92914,616.2525 920.68646,627.9986 920.68646,627.9986 C920.68646,627.9986 863.00067,637.68988 833.10913,641.37885 C816.06982,643.48169 1123.3755,643.06439 1123.3755,643.06439 z"/>
                        <Path
                                Fill="{StaticResource RibbonnBackStage_CornerPath4}"
                                Margin="73.735,55.826,31.706,-0.386"
                                Stretch="Fill"
                                Stroke="{x:Null}"
                                RenderTransformOrigin="0.5,0.5"
                                Data="M-367.12283,642.90454 C-367.63965,642.07587 -197.59694,596.60883 -109.59438,535.38568 C-107.99017,534.26965 -176.02165,607.07281 -307.60947,639.71875 C-308.53998,639.94958 -366.92459,643.22241 -367.12283,642.90454 z">
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <RotateTransform Angle="3.249"/>
                                    <TranslateTransform X="-1.0058153432702834" Y="1.8080198244160259"/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                        <Path
                                Stroke="{StaticResource RibbonnBackStage_CornerPath5}"
                                Margin="64,43.184,-0.091,4.846"
                                Stretch="Fill"
                                StrokeThickness="2"
                                Data="M-342.01355,643.15387 C-342.01355,643.15387 -246.18782,633.41809 -139.82617,585.00433 C-84.559242,559.8479 -45.132977,530.28394 -42.905621,528.20294"/>
                        <Path
                                Fill="{StaticResource RibbonnBackStage_CornerPath6}"
                                Height="75.5"
                                Margin="39.686,0,118.499,4.821"
                                Stretch="Fill"
                                Stroke="{x:Null}"
                                VerticalAlignment="Bottom"
                                Data="M-358.99686,643.23138 C-363.04657,642.54706 -233.95364,602.56274 -154.29437,567.93054 C-152.50218,567.15137 -255.679,633.41669 -345.54379,642.16193 C-346.49802,642.25476 -354.5575,643.98157 -358.99686,643.23138 z"/>
                        <Path
                                Fill="{StaticResource RibbonnBackStage_CornerPath7}"
                                Height="72.575"
                                Margin="48.71,0,121.855,5.269"
                                Stretch="Fill"
                                Stroke="{x:Null}"
                                VerticalAlignment="Bottom"
                                Data="M-358.99686,641.97211 C-362.3956,642.15503 -239.45111,609.26654 -166.6651,569.41693 C-164.95096,568.47845 -223.40971,611.79913 -345.54379,640.90265 C-346.47641,641.12488 -354.50107,641.7301 -358.99686,641.97211 z"/>
                    </Grid>
                    <ContentPresenter x:Name="ContentElement"
                            Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource InvertBoolToVisConverter}}"
                            ContentTemplate="{TemplateBinding SelectedContentTemplate}"
                            ContentTemplateSelector="{TemplateBinding SelectedContentTemplateSelector}"/>
                    <Grid x:Name="ContentElementsPanel" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource RibbonBooleanToVisibilityConverter}}"/>
                </Grid>
            </Grid>
        </ScrollViewer>
    </ControlTemplate>
    <Style x:Key="BackstageGroupSeparator" TargetType="telerikRibbonView:RadRibbonBackstageItem">
        <Setter Property="IsHitTestVisible" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikRibbonView:RadRibbonBackstageItem">
                    <StackPanel>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentPanel" To="0.5" Duration="0:0:0.1"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter x:Name="ContentPanel" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" Margin="20 5 0 5" VerticalAlignment="Center"/>
                        <Rectangle Height="1" Margin="18 0 10 4" Fill="{StaticResource RibbonnBackStage_DottedLineBrush}"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRibbonBackstageStyle" TargetType="telerikRibbonView:RadRibbonBackstage">
        <Setter Property="FocusManager.IsFocusScope" Value="True"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Cycle"/>
        <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Contained"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Align" Value="Right"/>
        <Setter Property="TabStripPlacement" Value="Left"/>
        <Setter Property="TabOrientation" Value="Vertical"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource RibbonnBackStage_BackgroundContent}"/>
        <Setter Property="HeaderBackground" Value="{StaticResource RibbonnBackStage_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RibbonnBackStage_BorderBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="ItemContainerStyleSelector">
            <Setter.Value>
                <telerikRibbonView:BackstageContainerStyleSelector>
                    <telerikRibbonView:BackstageContainerStyle ContainerStyle="{StaticResource BackstageGroupSeparator}"/>
                </telerikRibbonView:BackstageContainerStyleSelector>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel MinWidth="130"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource TabControlTemplate}"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonBackstage" BasedOn="{StaticResource RadRibbonBackstageStyle}"/>
    <Style TargetType="telerikRibbonView:RadRibbonBackstageItem" BasedOn="{StaticResource RadRibbonBackstageItemStyle}"/>
    <ControlTemplate x:Key="RadRibbonTabTemplate" TargetType="telerikRibbonView:RadRibbonTab">
        <Grid x:Name="RootPanel">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="EnabledStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Enabled"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="NotSelected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ContextualTabStates">
                    <VisualState x:Name="NotContextualTab">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ActiveContextualTab">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InactiveContextualTab">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="KeyboardNavigationVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="TabSeparator" Margin="0 0 -3 0" HorizontalAlignment="Right" Fill="{TemplateBinding BorderBrush}" VerticalAlignment="Stretch" Width="1" Visibility="Collapsed"/>
            <Grid x:Name="HeaderPanel" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HeaderVisibility, Mode=TwoWay}">
                <Border Background="{TemplateBinding Background}"/>
                <Border x:Name="Background_Over"
                        Visibility="Collapsed"
                        Background="{StaticResource TabMouseOverBackground}"
                        BorderBrush="{StaticResource TabMouseOverOuterBorder}"
                        BorderThickness="1 1 1 0"
                        CornerRadius="3 3 0 0">
                    <Border BorderThickness="1 1 1 0" CornerRadius="2 2 0 0" BorderBrush="{StaticResource TabMouseOverInnerBorder}"/>
                </Border>
                <Border x:Name="Background_Selected"
                        BorderThickness="1 1 1 0"
                        Visibility="Collapsed"
                        Background="{StaticResource TabSelectedBackground}"
                        BorderBrush="{StaticResource TabSelectedOuterBorder}"
                        CornerRadius="3 3 0 0">
                    <Border BorderThickness="1 1 1 0" CornerRadius="2 2 0 0" BorderBrush="{StaticResource TabSelectedInnerBorder}"/>
                </Border>
                <Border x:Name="KeyboardNavigationVisual"
                        BorderThickness="1 1 1 0"
                        Opacity="0"
                        Background="{StaticResource TabMouseOverBackground}"
                        BorderBrush="{StaticResource TabMouseOverOuterBorder}"
                        CornerRadius="3 3 0 0">
                    <Border BorderThickness="1 1 1 0" CornerRadius="2 2 0 0" BorderBrush="{StaticResource TabMouseOverInnerBorder}"/>
                </Border>
                <ContentPresenter x:Name="HeaderElement"
                        Content="{TemplateBinding Header}"
                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"
                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                        ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"/>
            </Grid>
            <Grid x:Name="ContentPanel" Width="0" Height="0">
                <Border
                        Name="OuterBorder"
                        BorderThickness="1"
                        Background="{StaticResource RibbonTabBackgroundBrush}"
                        BorderBrush="{StaticResource RibbonTabOuterBorderBrush}"
                        CornerRadius="{StaticResource RibbonTabOuterCornerRadius}">
                    <Border Name="InnerBorder" CornerRadius="{StaticResource RibbonTabInnerCornerRadius}" BorderThickness="1" BorderBrush="{StaticResource RibbonTabInnerBorderBrush}"/>
                </Border>
                <telerikRibbonViewPrimitives:RibbonScrollViewer x:Name="TabItemsScrollViewer">
                    <ItemsPresenter HorizontalAlignment="Left" Margin="2"/>
                </telerikRibbonViewPrimitives:RibbonScrollViewer>
            </Grid>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadRibbonTabStyle" TargetType="telerikRibbonView:RadRibbonTab">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="#000000"/>
        <Setter Property="Padding" Value="13 4"/>
        <Setter Property="BorderThickness" Value="1 0 0 0"/>
        <Setter Property="Margin" Value="0 0 3 0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style TargetType="Control">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource RadRibbonTabTemplate}"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerikRibbonViewPrimitives:RibbonGroupsPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonTab" BasedOn="{StaticResource RadRibbonTabStyle}"/>
    <ControlTemplate x:Key="ContextualTabsTemplate" TargetType="telerikRibbonView:RadRibbonTab">
        <Grid x:Name="RootPanel">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="EnabledStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Enabled"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                    <VisualState x:Name="Selected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="NotSelected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ContextualTabStates">
                    <VisualState x:Name="NotContextualTab">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="ActiveContextualTab">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="InactiveContextualTab">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderPanel" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ContextualGroupStates">
                    <VisualState x:Name="DefaultContextualGroupTab"/>
                    <VisualState x:Name="IsSingleTabInContextualGroup">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContextualGroupRightBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContextualGroupLeftBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="IsLastTabInContextualGroup">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContextualGroupRightBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="KeyboardNavigationVisual" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="IsFirstTabInContextualGroup">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContextualGroupLeftBorder" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="KeyboardNavigationVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="TabSeparator" Visibility="Collapsed" Margin="0 0 -3 0" HorizontalAlignment="Right" Fill="{TemplateBinding BorderBrush}" VerticalAlignment="Stretch" Width="1"/>
            <Grid x:Name="HeaderPanel" Background="Transparent" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HeaderVisibility, Mode=TwoWay}">
                <Border Background="{TemplateBinding Background}">
                    <Border.OpacityMask>
                        <RadialGradientBrush Center="0.5,1" GradientOrigin="0.5,1" RadiusX="1" RadiusY="1">
                            <GradientStop Offset="1" Color="#4D000000"/>
                            <GradientStop Color="#80FFFFFF" Offset="0.19"/>
                        </RadialGradientBrush>
                    </Border.OpacityMask>
                </Border>
                <Border x:Name="Background_Over" Visibility="Collapsed" Margin="0 0 3 0" BorderBrush="{TemplateBinding Background}" BorderThickness="1 1 1 0" CornerRadius="2 2 0 0">
                    <Border CornerRadius="2 2 0 0" BorderBrush="#99FFFFFF" BorderThickness="1 1 1 0">
                        <Border CornerRadius="1 1 0 0" Opacity="0.6" Background="{TemplateBinding Background}">
                            <Border.OpacityMask>
                                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                                    <GradientStop Color="#ffFFFFFF" Offset="1"/>
                                    <GradientStop Color="#19FFFFFF" Offset="0.527"/>
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                        </Border>
                    </Border>
                </Border>
                <Border x:Name="Background_Selected"
                        Visibility="Collapsed"
                        Margin="0 0 3 0"
                        BorderBrush="{TemplateBinding Background}"
                        Background="#FFFFFFFF"
                        BorderThickness="1 1 1 0"
                        CornerRadius="2 2 0 0">
                    <Border x:Name="InnerBackground" Background="{TemplateBinding Background}">
                        <Border.OpacityMask>
                            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                <GradientStop Color="#19FFFFFF" Offset="0"/>
                                <GradientStop Color="#59FFFFFF" Offset="0.173"/>
                                <GradientStop Color="#7FFFFFFF" Offset="0.191"/>
                                <GradientStop Color="Transparent" Offset="0.866"/>
                            </LinearGradientBrush>
                        </Border.OpacityMask>
                    </Border>
                </Border>
                <Border x:Name="KeyboardNavigationVisual"
                        BorderThickness="1 1 1 0"
                        Margin="0 0 3 0"
                        Opacity="0"
                        Background="{StaticResource TabMouseOverBackground}"
                        BorderBrush="{StaticResource TabMouseOverOuterBorder}"
                        CornerRadius="3 3 0 0">
                    <Border BorderThickness="1 1 1 0" CornerRadius="2 2 0 0" BorderBrush="{StaticResource TabMouseOverInnerBorder}"/>
                </Border>
                <Border BorderThickness="1 0 0 0" x:Name="ContextualGroupLeftBorder" Grid.ColumnSpan="2" Visibility="Collapsed" BorderBrush="Black" Margin="0 0 0 0">
                    <Border.OpacityMask>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#A5FFFFFF" Offset="0"/>
                            <GradientStop Color="#4CFFFFFF" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.OpacityMask>
                </Border>
                <Border BorderThickness="0 0 1 0" x:Name="ContextualGroupRightBorder" Grid.ColumnSpan="2" BorderBrush="Black" Visibility="Collapsed" Margin="0 0 0 0">
                    <Border.OpacityMask>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#A5FFFFFF" Offset="0"/>
                            <GradientStop Color="#4CFFFFFF" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.OpacityMask>
                </Border>
                <ContentPresenter x:Name="HeaderElement"
                        Content="{TemplateBinding Header}"
                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Margin="{TemplateBinding Padding}"
                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                        ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"/>
            </Grid>
            <Grid x:Name="ContentPanel" Width="0" Height="0">
                <Border
                        Name="OuterBorder"
                        BorderThickness="1"
                        Background="{StaticResource RibbonTabBackgroundBrush}"
                        BorderBrush="{TemplateBinding Background}"
                        CornerRadius="{StaticResource RibbonTabOuterCornerRadius}">
                    <telerikRibbonViewPrimitives:RibbonScrollViewer x:Name="TabItemsScrollViewer">
                        <ItemsPresenter HorizontalAlignment="Left"/>
                    </telerikRibbonViewPrimitives:RibbonScrollViewer>
                </Border>
            </Grid>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ContextualTabsStyle" TargetType="telerikRibbonView:RadRibbonTab">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style TargetType="Control">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{StaticResource TabStripTabDividerBrush}"/>
        <Setter Property="BorderThickness" Value="1 0 0 0"/>
        <Setter Property="Padding" Value="13 4"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerikRibbonViewPrimitives:RibbonGroupsPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource ContextualTabsTemplate}"/>
    </Style>
    <ControlTemplate x:Key="ContextualGroupsTemplate" TargetType="telerikRibbonView:RadRibbonContextualGroup">
        <Grid x:Name="HeaderGrid" Background="Transparent" Margin="0">
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Margin="{StaticResource ContextualGroup_OpacityMask_Thickness}">
                <Border.OpacityMask>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#A5FFFFFF" Offset="0"/>
                        <GradientStop Color="#4CFFFFFF" Offset="1"/>
                    </LinearGradientBrush>
                </Border.OpacityMask>
            </Border>
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding Color}"/>
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="Black" Opacity="0.5"/>
            <Border Background="{TemplateBinding Color}" BorderThickness="1 0">
                <Border.OpacityMask>
                    <RadialGradientBrush Center="0.5,1.136" GradientOrigin="0.5,1.136" RadiusX="0.736" RadiusY="0.895">
                        <GradientStop Offset="1" Color="#4D000000"/>
                        <GradientStop Color="#80FFFFFF" Offset="0.19"/>
                    </RadialGradientBrush>
                </Border.OpacityMask>
            </Border>
            <ContentControl
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    IsTabStop="False"
                    Content="{TemplateBinding Header}"
                    FontSize="{TemplateBinding FontSize}"
                    HorizontalAlignment="{TemplateBinding HeaderAlignment}"
                    Margin="{TemplateBinding Padding}"
                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                    Foreground="{TemplateBinding Foreground}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ContextualGroupsStyle" TargetType="telerikRibbonView:RadRibbonContextualGroup">
        <Setter Property="Margin" Value="0 0 3 0"/>
        <Setter Property="Foreground" Value="{StaticResource ContextualGroup_Foreground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ContextualGroup_BorderBrush}"/>
        <Setter Property="BorderThickness" Value="1 2 1 0"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="HeaderAlignment" Value="Center"/>
        <Setter Property="Padding" Value="5 5 5 2"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template" Value="{StaticResource ContextualGroupsTemplate}"/>
    </Style>
    <ControlTemplate x:Key="OverflowMenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
        <ContentPresenter Margin="30 0 0 0" Content="{TemplateBinding Header}"/>
    </ControlTemplate>
    <ControlTemplate x:Key="QuickAccessToolBarTemplate" TargetType="telerikRibbonView:QuickAccessToolBar">
        <Grid x:Name="RootElement">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStateGroup">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RootElement" To="0.5" Duration="0:0:0.2"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="HostingState">
                    <VisualState x:Name="NotHosted"/>
                    <VisualState x:Name="HostedAboveRibbon"/>
                    <VisualState x:Name="HostedBelowRibbon">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AboveBackgroundGrid" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BelowBackgroundGrid" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_StripPanel" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>2 2 0 2</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TogglePositionMenuItem" Storyboard.TargetProperty="Header">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:LocalizableResource Key=RibbonViewQATShowAbove}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="MinimizeStates">
                    <VisualState x:Name="NotMinimized"/>
                    <VisualState x:Name="Minimized">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MinimizeMenuItem" Storyboard.TargetProperty="Header">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:LocalizableResource Key=RibbonViewQATRestore}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid x:Name="BelowBackgroundGrid" Grid.ColumnSpan="3" Visibility="Collapsed">
                <Border Background="{TemplateBinding Background}" BorderThickness="1" CornerRadius="2 2 0 0" Margin="1 1 0 0"/>
                <Border BorderThickness="1" CornerRadius="2 2 0 0" BorderBrush="{TemplateBinding BorderBrush}" Margin="0 0 1 1"/>
            </Grid>
            <Grid x:Name="AboveBackgroundGridWrapper">
                <Grid x:Name="AboveBackgroundGrid"/>
            </Grid>
            <telerikToolBar:RadToolBarPanel x:Name="PART_StripPanel" Margin="3 0 0 0" Orientation="Horizontal"/>
            <telerikRibbonView:RadRibbonDropDownButton x:Name="DropDownButton"
                    MinWidth="0"
                    Visibility="{TemplateBinding CustomizationMenuVisibility}"
                    DropDownIndicatorVisibility="Collapsed"
                    IsOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsOverflowOpen, Mode=TwoWay}"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    Grid.Column="1"
                    VerticalContentAlignment="Center"
                    Width="15"
                    Height="22"
                    Padding="0">
                <ToolTipService.ToolTip>
                    <TextBlock Text="{telerik:LocalizableResource Key=RibbonViewQATCustomize}"/>
                </ToolTipService.ToolTip>
                <telerikRibbonView:RadRibbonDropDownButton.DropDownContent>
                    <StackPanel>
                        <telerikRibbonView:RadGroupHeader IsTabStop="False" Content="{telerik:LocalizableResource Key=RibbonViewQATCustomize}"/>
                        <telerikNavigation:RadMenuItem SubmenuItemTemplateKey="{StaticResource OverflowMenuItemTemplate}" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HasOverflowItems, Converter={StaticResource RibbonBooleanToVisibilityConverter}}" Foreground="{TemplateBinding Foreground}">
                            <telerikNavigation:RadMenuItem.Header>
                                <telerikToolBar:RadToolBarPanel x:Name="PART_OverflowPanel" Orientation="Vertical" VerticalAlignment="Top"/>
                            </telerikNavigation:RadMenuItem.Header>
                        </telerikNavigation:RadMenuItem>
                        <telerikNavigation:RadMenuItem
                                IsSeparator="True"
                                Padding="0"
                                Margin="0"
                                MinHeight="0"
                                Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HasOverflowItems, Converter={StaticResource RibbonBooleanToVisibilityConverter}}"
                                Foreground="{TemplateBinding Foreground}"/>
                        <telerikNavigation:RadMenuItem x:Name="TogglePositionMenuItem"
                                Header="{telerik:LocalizableResource Key=RibbonViewQATShowBelow}"
                                Foreground="{TemplateBinding Foreground}"
                                Command="{x:Static telerikRibbonView:RibbonCommands.ToggleQATPositionCommand}"/>
                        <telerikNavigation:RadMenuItem IsSeparator="True" Padding="0" Margin="0" MinHeight="0"/>
                        <telerikNavigation:RadMenuItem x:Name="MinimizeMenuItem"
                                Header="{telerik:LocalizableResource Key=RibbonViewQATMinimize}"
                                Foreground="{TemplateBinding Foreground}"
                                Command="{x:Static telerikRibbonView:RibbonCommands.MinimizeRibbonCommand}"/>
                    </StackPanel>
                </telerikRibbonView:RadRibbonDropDownButton.DropDownContent>
                <Grid>
                    <Path
                            Fill="{StaticResource QatButtonArrowHighlight}"
                            Stretch="Fill"
                            Stroke="{x:Null}"
                            HorizontalAlignment="Center"
                            Margin="0 2 0 0"
                            Width="5"
                            Data="M0,3 L5,3 5,4 4,4 4,5 3,5 3,6 2,6 2,5 1,5 1,4 0,4 z M0,0 L5,0 5,1 0,1 z"
                            VerticalAlignment="Center"
                            Height="6"/>
                    <Path
                            Stroke="{x:Null}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Data="M0,3 L5,3 5,4 4,4 4,5 3,5 3,6 2,6 2,5 1,5 1,4 0,4 z M0,0 L5,0 5,1 0,1 z"
                            Fill="{TemplateBinding Foreground}"/>
                </Grid>
            </telerikRibbonView:RadRibbonDropDownButton>
        </Grid>
    </ControlTemplate>
    <Style x:Key="QuickAccessToolBarStyle" TargetType="telerikRibbonView:QuickAccessToolBar">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource QatBelowBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource QatBelowOuterBorderBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="CustomizationMenuVisibility" Value="Visible"/>
        <Setter Property="Template" Value="{StaticResource QuickAccessToolBarTemplate}"/>
    </Style>
    <Style x:Key="WindowTitleStyle" TargetType="telerikRibbonViewPrimitives:WindowTitle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Margin" Value="0 6"/>
        <Setter Property="Foreground" Value="{StaticResource RibbonTitlebarApplicationNameBrush}"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="IsHitTestVisible" Value="false"/>
        <Setter Property="IsActive" Value="True"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikRibbonViewPrimitives:WindowTitle">
                    <telerikRibbonViewPrimitives:WindowTitlePanel>
                        <TextBlock x:Name="Title" Text="{TemplateBinding Title}" Foreground="{TemplateBinding Foreground}" TextTrimming="CharacterEllipsis"/>
                        <TextBlock x:Name="Divider"
                                Text="{telerik:LocalizableResource Key=RibbonViewWindowTitleDivider}"
                                Visibility="{TemplateBinding DividerVisibility}"
                                Foreground="{TemplateBinding Foreground}"/>
                        <TextBlock x:Name="ApplicationName" Text="{TemplateBinding ApplicationName}" Foreground="{TemplateBinding Foreground}" TextTrimming="CharacterEllipsis"/>
                    </telerikRibbonViewPrimitives:WindowTitlePanel>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, Path=IsHostedInRibbonWindow}" Value="True">
                            <c:Case Condition="VisualStudio2013">
                                <Setter TargetName="WindowTitle" Property="Foreground" Value="{StaticResource MarkerBrush}"/>
                            </c:Case>
                            <c:Default>
                                <Setter TargetName="WindowTitle" Property="Foreground" Value="{StaticResource RibbonWindow_TitlebarApplicationNameBrush}"/>
                            </c:Default>
                        </DataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsHostedInRibbonWindow, RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, FallbackValue=False}" Value="True"/>
                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonWindow}, Path=IsWindowsThemeEnabled}" Value="True"/>
                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonWindow}, Path=IsTitleVisible}" Value="False"/>
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Foreground" Value="Black"/>
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="HelpButtonStyle" TargetType="telerikRibbonView:RadRibbonButton" BasedOn="{StaticResource RadRibbonButtonStyle}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <ControlTemplate x:Key="MinimizeButtonTemplate" TargetType="telerikRibbonView:RadRibbonToggleButton">
        <Grid x:Name="RootElement">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="OuterBorder">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonOverBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="OuterBorder">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonOverBorder}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="InnerBorder">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonOverBorderInner}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="OuterBorder">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonPressedBackground}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="OuterBorder">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonPressedBorder}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="InnerBorder">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource RadRibbonBarButtonPressedBorderInner}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="arrow" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Unchecked">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootElement" Storyboard.TargetProperty="(telerikRibbonView:ScreenTip.Title)">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:LocalizableResource Key=RibbonViewMinimizeRibbon}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="directionRotation" Storyboard.TargetProperty="Angle" To="0" Duration="0"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="arrow" Storyboard.TargetProperty="Margin" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0 0 0 -2</Thickness>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootElement" Storyboard.TargetProperty="(telerikRibbonView:ScreenTip.Title)">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:LocalizableResource Key=RibbonViewExpandRibbon}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="2">
                <Border x:Name="InnerBorder" BorderBrush="Transparent" BorderThickness="1"/>
            </Border>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{StaticResource RadRibbonBarButtonOverBackground}"
                    BorderBrush="{StaticResource RadRibbonBarButtonOverBorder}">
                <Border CornerRadius="2" BorderThickness="1" BorderBrush="{StaticResource RadRibbonBarButtonOverBorderInner}"/>
            </Border>
            <Path x:Name="arrow"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"
                    Data="M0,0 L3,0 6,3 9,0 12,0 6,6 z"
                    RenderTransformOrigin="0.5 0.5"
                    Stretch="None"
                    Fill="White"
                    Stroke="Black"
                    StrokeThickness="0.5"
                    Margin="0 -2 0 0"
                    Width="13"
                    Height="6">
                <Path.RenderTransform>
                    <RotateTransform x:Name="directionRotation" Angle="180"/>
                </Path.RenderTransform>
            </Path>
        </Grid>
    </ControlTemplate>
    <Style x:Key="MinimizeButtonStyle" TargetType="telerikRibbonView:RadRibbonToggleButton">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Size" Value="Small"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinWidth" Value="22"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="Margin" Value="1"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Template" Value="{StaticResource MinimizeButtonTemplate}"/>
    </Style>
    <ControlTemplate x:Key="RadRibbonViewTemplate" TargetType="telerikRibbonView:RadRibbonView">
        <Grid x:Name="RootPanel">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Rectangle Grid.Row="1" Grid.RowSpan="2" Fill="{TemplateBinding Background}"/>
            <ContentPresenter x:Name="SelectedTabContent" Grid.Row="1" Height="{TemplateBinding ContentHeight}" Margin="1 0 1 0"/>
            <Grid x:Name="TopGrid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Border x:Name="titleBarBackground"
                        Background="{TemplateBinding TitleBarBackground}"
                        IsHitTestVisible="False"
                        Grid.ColumnSpan="3"
                        BorderBrush="White"
                        BorderThickness="0 0 0 1"/>
                <Rectangle Grid.Row="1" Grid.ColumnSpan="3" StrokeThickness="0" Fill="{TemplateBinding Background}"/>
                <telerikRibbonViewPrimitives:RibbonTitleBarPanel x:Name="RibbonTitleBarPanel" Grid.ColumnSpan="2" Visibility="{TemplateBinding TitleBarVisibility}">
                    <ContentPresenter x:Name="AboveToolBarHost" VerticalAlignment="Center" telerikRibbonViewPrimitives:RibbonTitleBarPanel.Element="QuickAccessToolBar"/>
                    <telerikRibbonViewPrimitives:WindowTitle x:Name="WindowTitle"
                            Title="{TemplateBinding Title}"
                            telerikRibbonViewPrimitives:RibbonTitleBarPanel.Element="WindowTitle"
                            ApplicationName="{TemplateBinding ApplicationName}"
                            Style="{TemplateBinding WindowTitleStyle}"/>
                    <StackPanel x:Name="ContextualGroupsHeaders" Margin="1 0 0 0" Orientation="Horizontal" telerikRibbonViewPrimitives:RibbonTitleBarPanel.Element="ContextualGroupsPanel"/>
                </telerikRibbonViewPrimitives:RibbonTitleBarPanel>
                <telerikRibbonViewPrimitives:RadRibbonApplicationDropDownButton x:Name="ApplicationButton"
                        Grid.Row="1"
                        IsEnabled="{TemplateBinding IsApplicationButtonEnabled}"
                        IsOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsApplicationMenuOpen, Mode=TwoWay}"
                        SmallImage="{TemplateBinding ApplicationButtonImageSource}"
                        Content="{TemplateBinding ApplicationButtonContent}"
                        Visibility="{TemplateBinding ApplicationButtonVisibility}"
                        Style="{TemplateBinding ApplicationButtonStyle}"/>
                <telerikRibbonViewPrimitives:RibbonScrollViewer Grid.Column="1" Grid.Row="1" Margin="0 0 0 -1" x:Name="TabsScrollViewer">
                    <ItemsPresenter/>
                </telerikRibbonViewPrimitives:RibbonScrollViewer>
                <StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="1">
                    <telerikRibbonView:RadRibbonToggleButton x:Name="MinimizeButton"
                            Style="{TemplateBinding MinimizeButtonStyle}"
                            Visibility="{TemplateBinding MinimizeButtonVisibility}"
                            IsEnabled="{TemplateBinding IsMinimizable}"
                            IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsMinimized, Mode=TwoWay}"/>
                    <telerikRibbonView:RadRibbonButton
                            Command="{TemplateBinding HelpCommand}"
                            CommandParameter="{TemplateBinding HelpCommandParameter}"
                            CommandTarget="{TemplateBinding HelpCommandTarget}"
                            x:Name="HelpButton"
                            Visibility="{TemplateBinding HelpButtonVisibility}"
                            SmallImage="{TemplateBinding HelpButtonImageSource}"
                            Style="{TemplateBinding HelpButtonStyle}"
                            telerikRibbonView:ScreenTip.Title="{telerik:LocalizableResource Key=RibbonViewHelp}"/>
                    <ContentPresenter Content="{TemplateBinding TabStripAdditionalContent}"/>
                </StackPanel>
                <Rectangle Fill="Transparent" VerticalAlignment="Bottom" Height="2" Margin="0 0 0 -1" Grid.ColumnSpan="3" Grid.RowSpan="2"/>
            </Grid>
            <ContentPresenter x:Name="BelowToolBarHost" Grid.Row="2"/>
            <Popup x:Name="TabContentPopup" VerticalOffset="-1" PlacementTarget="{Binding ElementName=TopGrid}" AllowsTransparency="True">
                <ContentPresenter x:Name="SelectedTabContentPopup" Height="{TemplateBinding ContentHeight}"/>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsHostedInRibbonWindow" Value="true">
                <Setter TargetName="titleBarBackground" Property="Visibility" Value="Collapsed"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadRibbonViewStyle" TargetType="telerikRibbonView:RadRibbonView">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerikRibbonViewPrimitives:RibbonTabStripPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusManager.IsFocusScope" Value="True"/>
        <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="None"/>
        <Setter Property="KeyboardNavigation.ControlTabNavigation" Value="None"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
        <Setter Property="Foreground" Value="{StaticResource RibbonForegroundBrush}"/>
        <Setter Property="Background" Value="{StaticResource RibbonBackgroundBrush}"/>
        <Setter Property="TitleBarBackground" Value="{StaticResource RibbonTitlebarBackgroundBrush}"/>
        <Setter Property="ContentHeight" Value="96"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="ApplicationButtonStyle" Value="{StaticResource RadRibbonApplicationDropDownButtonStyle}"/>
        <Setter Property="HelpButtonStyle" Value="{StaticResource HelpButtonStyle}"/>
        <Setter Property="MinimizeButtonStyle" Value="{StaticResource MinimizeButtonStyle}"/>
        <Setter Property="ContextualTabsStyle" Value="{StaticResource ContextualTabsStyle}"/>
        <Setter Property="WindowTitleStyle" Value="{StaticResource WindowTitleStyle}"/>
        <Setter Property="HelpButtonImageSource">
            <Setter.Value>
                <BitmapImage UriSource="pack://application:,,,/Telerik.Windows.Controls.RibbonView;component/HelpIcon.png"/>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource RadRibbonViewTemplate}"/>
    </Style>
    <Style TargetType="telerikRibbonView:QuickAccessToolBar" BasedOn="{StaticResource QuickAccessToolBarStyle}"/>
    <Style TargetType="telerikRibbonViewPrimitives:WindowTitle" BasedOn="{StaticResource WindowTitleStyle}"/>
    <Style TargetType="telerikRibbonView:RadRibbonView" BasedOn="{StaticResource RadRibbonViewStyle}"/>
    <Style TargetType="telerikRibbonView:RadRibbonContextualGroup" BasedOn="{StaticResource ContextualGroupsStyle}"/>
    <telerik:IconSources x:Key="IconSources"
            LightBasePath="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/"
            DarkBasePath="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/Dark/"
            ModernBasePath="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/Modern/"/>
    <telerik:IconSources x:Key="IconSourcesImageMiniToolbar"
            LightBasePath="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/ImageMiniToolBar/"
            ModernBasePath="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/ImageMiniToolBar/"
            DarkBasePath="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/ImageMiniToolBar/Dark/"/>
    <SolidColorBrush x:Key="ZoomInOutButtonForegroundBrush" Color="#FF828588"/>
    <SolidColorBrush x:Key="ZoomInOutButtonBorderBrush" Color="#FF64676A"/>
    <LinearGradientBrush x:Key="ZoomInOutButtonBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFF4F4F5" Offset="0.723"/>
        <GradientStop Color="#FFE3E6E9" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="SliderDarkerBrush" Color="#FF64676A"/>
    <SolidColorBrush x:Key="SliderLighterBrush" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="CheckedBorderBrush" Color="#B299DEFD"/>
    <LinearGradientBrush x:Key="CheckedBorderBackground" StartPoint="0.5 0" EndPoint="0.5 1">
        <GradientStop Color="#FFF1F8FD" Offset="0"/>
        <GradientStop Color="#FFD5EFFC" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RadRichTextBoxStatusBar_Background" Color="#FFF0F0F0"/>
    <SolidColorBrush x:Key="RadRichTextBoxStatusBar_BorderBrush" Color="#FF898C95"/>
    <Thickness x:Key="MultipleUndoControl_ButtonMargin">-1 1 -1 -1</Thickness>
    <SolidColorBrush x:Key="VerticalCanvasBackground" Color="#FFF0F0F0"/>
    <SolidColorBrush x:Key="HorizontalCanvasBackground" Color="#FFF0F0F0"/>
    <SolidColorBrush x:Key="HorizontalMargin_Fill" Color="#FFF0F0F0"/>
    <SolidColorBrush x:Key="HorizontalMargin_Stroke" Color="#FF898C95"/>
    <SolidColorBrush x:Key="HorizontalRuler_Background" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="HorizontalRuler_Stroke" Color="Transparent"/>
    <SolidColorBrush x:Key="VerticalRuler_Background" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ColumnResizeThumbStyle_GridLinesStroke" Color="#FF898C95"/>
    <SolidColorBrush x:Key="ColumnResizeThumbStyle_GridLinesFill" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ParagraphIndent_OuterThumb_Fill" Color="Transparent"/>
    <SolidColorBrush x:Key="ParagraphIndent_OuterThumb_Stroke" Color="#FF898C95"/>
    <LinearGradientBrush x:Key="ParagraphIndent_InnerThumb_Fill" EndPoint="0.5 0" StartPoint="0.5 1">
        <GradientStop Color="#FFD0D0D0"/>
        <GradientStop Color="#FFF2F2F2" Offset="1"/>
        <GradientStop Color="#FFDDDDDD" Offset="0.49"/>
        <GradientStop Color="#FFECECEC" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ParagraphIndent_InnerThumb_Stroke" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="TopLeftRectangle_Fill" Color="#FFF0F0F0"/>
    <SolidColorBrush x:Key="TopLeftRectangle_Stroke" Color="#FF898C95"/>
    <SolidColorBrush x:Key="MarkLine_Stroke" Color="#FF000000"/>
    <SolidColorBrush x:Key="MarkersBrush" Color="#FF000000"/>
    <SolidColorBrush x:Key="TabStopForeground" Color="#FF000000"/>
    <SolidColorBrush x:Key="TabStopMarker_LightForeground" Color="#FFACAFB6"/>
    <SolidColorBrush x:Key="TabStopsBorder_Background" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="TabStopsBorder_BorderBrush" Color="#FF898C95"/>
    <SolidColorBrush x:Key="ImageMiniToolBar_Background" Color="#FFE1F1F9"/>
    <SolidColorBrush x:Key="ImageMiniToolBar_BorderBrush" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="ImageMiniToolBar_InnerBorderBrush" Color="#FFFFFFFF"/>
    <CornerRadius x:Key="ImageMiniToolBar_CornerRadius">4</CornerRadius>
    <CornerRadius x:Key="ImageMiniToolBar_InnerCornerRadius">3</CornerRadius>
    <LinearGradientBrush x:Key="ImageMiniToolBar_FooterBackground" EndPoint="0.5 1" StartPoint="0.5 0">
        <GradientStop Color="#FFA9DAF4"/>
        <GradientStop Color="#FFE1F1F9" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ImageMiniToolBar_FooterBorderBrush" Color="Transparent"/>
    <CornerRadius x:Key="ImageMiniToolBar_FooterCornerRadius">0 0 3 3</CornerRadius>
    <SolidColorBrush x:Key="ImageMiniToolBar_Foreground" Color="#FF000000"/>
    <SolidColorBrush x:Key="ImageMiniToolBar_SeparatorUnderlay" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ImageMiniToolBar_SeparatorOverlay" Color="#FF3C7FB1"/>
    <SolidColorBrush x:Key="ImageMiniToolBarCloseButton_Foreground" Color="#FF333333"/>
    <LinearGradientBrush x:Key="ImageMiniToolBarCloseButton_Background" EndPoint="0.5 1" StartPoint="0.5 0">
        <GradientStop Color="#FF81C3E5" Offset="1"/>
        <GradientStop Color="#FFBDE4F9" Offset="0"/>
        <GradientStop Color="#FF98D1EF" Offset="0.5"/>
        <GradientStop Color="#FFB4E0F7" Offset="0.499"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ImageMiniToolBarCloseButton_BorderBrush" Color="#FF3C7FB1"/>
    <LinearGradientBrush x:Key="ImageMiniToolBar_ShadowOpacityMask" EndPoint="0.5 4.75" StartPoint="0.5 -3.75">
        <GradientStop Color="#FF000000" Offset="0.436"/>
        <GradientStop Color="#FF000000" Offset="0.564"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ImageMiniToolBar_ShadowFill" EndPoint="0.5 0.74" StartPoint="0.5 0.122">
        <GradientStop Color="#00F0F0F0" Offset="1"/>
        <GradientStop Color="#FFC8CDE2"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ImageEditorDialog_FooterInnerBorderBrush" Color="Transparent"/>
    <SolidColorBrush x:Key="Dialog_FooterBorderBrush" Color="#FF898C95"/>
    <SolidColorBrush x:Key="Dialog_FooterInnerBorderBrush" Color="Transparent"/>
    <SolidColorBrush x:Key="Dialog_FooterBackground" Color="#FFF0F0F0"/>
    <SolidColorBrush x:Key="RichTextBoxToolbars_ForegroundBrush" Color="#FF000000"/>
    <Style x:Key="TextElementPropertiesExplicitStyle" TargetType="Control">
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontFamily" Value="Calibri"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Foreground" Value="{StaticResource RichTextBoxToolbars_ForegroundBrush}"/>
    </Style>
    <Style TargetType="telerikColorPickers:HighlightColorPicker" BasedOn="{StaticResource RadColorPickerStyle}"/>
    <Style TargetType="telerikColorPickers:FormattingColorPicker" BasedOn="{StaticResource RadColorPickerStyle}"/>
    <Style TargetType="telerikDialogs:ChangeEditingPermissionsDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:EditCustomDictionaryDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:FindReplaceDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:FloatingBlockPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:FontPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:ImageEditorDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:InsertCaptionDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:InsertCrossReferenceWindow" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:InsertDateTimeDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:InsertTableDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:ManageBookmarksDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:ManageStylesDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:ProtectDocumentDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:RadInsertHyperlinkDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:RadInsertSymbolDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:RadParagraphPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="NumericWidth" Value="85"/>
    </Style>
    <Style TargetType="telerikDialogs:SpellCheckingDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:StyleFormattingPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:TablePropertiesDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:TableBordersDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:TabStopsPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:UnprotectDocumentDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:WatermarkSettingsDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:NewCaptionLabelDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:InsertTableOfContentsDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:ManageBibliographicSourcesDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:NotesDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:AddNewBibliographicSourceDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:SetNumberingValueDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:ModifyMultiLevelListDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:ModifyTableStyleBanding" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:CodeFormattingDialog" BasedOn="{StaticResource RadWindowStyle}"/>
    <Style TargetType="telerikDialogs:SectionColumnsDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="ColumnPropertiesNumericWidth" Value="77"/>
    </Style>
    <telerikControlsRTBUI:FontFamiliesProvider x:Key="FontFamiliesProvider"/>
    <telerikControlsRTBUI:PointToDipConverter x:Key="PointToDipConverter"/>
    <ItemsControl x:Key="FontSizes">
        <sys:Double>8</sys:Double>
        <sys:Double>9</sys:Double>
        <sys:Double>10</sys:Double>
        <sys:Double>11</sys:Double>
        <sys:Double>12</sys:Double>
        <sys:Double>14</sys:Double>
        <sys:Double>16</sys:Double>
        <sys:Double>18</sys:Double>
        <sys:Double>20</sys:Double>
        <sys:Double>22</sys:Double>
        <sys:Double>24</sys:Double>
        <sys:Double>26</sys:Double>
        <sys:Double>28</sys:Double>
        <sys:Double>36</sys:Double>
        <sys:Double>48</sys:Double>
        <sys:Double>72</sys:Double>
    </ItemsControl>
    <Style x:Key="MiniToolbarBaseStyle" TargetType="Control" BasedOn="{StaticResource TextElementPropertiesExplicitStyle}">
        <Setter Property="Background" Value="{StaticResource ImageMiniToolBar_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ImageMiniToolBar_BorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
    </Style>
    <Style x:Key="SelectionMiniToolBarStyle" TargetType="telerikControlsRTBUI:SelectionMiniToolBar" BasedOn="{StaticResource MiniToolbarBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUI:SelectionMiniToolBar">
                    <Border
                            CornerRadius="{StaticResource ImageMiniToolBar_CornerRadius}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}">
                        <StackPanel Margin="3">
                            <StackPanel Orientation="Horizontal" Margin="0 0 0 3">
                                <telerik:RadComboBox x:Name="fontFamilyComboBox"
                                        IsTabStop="False"
                                        CanKeyboardNavigationSelectItems="False"
                                        CanAutocompleteSelectItems="False"
                                        IsReadOnly="True"
                                        ItemsSource="{Binding Source={StaticResource FontFamiliesProvider}, Path=RegisteredFonts}"
                                        Command="{Binding Path=ChangeFontFamilyCommand}"
                                        CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedValue}"
                                        HorizontalAlignment="Stretch"
                                        MaxDropDownHeight="250"
                                        DropDownWidth="220"
                                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                                        Margin="0 0 3 0"
                                        Width="120"
                                        Focusable="False">
                                    <telerik:RadComboBox.ItemTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding DisplayName}" FontFamily="{Binding}"/>
                                        </DataTemplate>
                                    </telerik:RadComboBox.ItemTemplate>
                                    <telerik:RadComboBox.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <VirtualizingStackPanel ScrollViewer.HorizontalScrollBarVisibility="Hidden"/>
                                        </ItemsPanelTemplate>
                                    </telerik:RadComboBox.ItemsPanel>
                                </telerik:RadComboBox>
                                <telerik:RadComboBox x:Name="fontSizeComboBox"
                                        IsTabStop="False"
                                        CanKeyboardNavigationSelectItems="False"
                                        CanAutocompleteSelectItems="False"
                                        IsReadOnly="True"
                                        ItemsSource="{Binding Path=Items, Source={StaticResource FontSizes}}"
                                        Command="{Binding Path=ChangeFontSizeCommand}"
                                        CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedValue, Converter={StaticResource PointToDipConverter}}"
                                        IsEditable="True"
                                        IsTextSearchEnabled="False"
                                        MaxDropDownHeight="340"
                                        Width="44"
                                        Focusable="False"/>
                                <telerik:RadButton x:Name="buttonIncrementFontSize" Command="{Binding Path=IncrementFontSizeCommand}" IsTabStop="False" IsBackgroundVisible="False" Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/font-increasesize.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadButton>
                                <telerik:RadButton x:Name="buttonDecrementFontSize" Command="{Binding Path=DecrementFontSizeCommand}" IsTabStop="False" IsBackgroundVisible="False" Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/font-decreasesize.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadButton>
                                <telerik:RadButton x:Name="buttonDecrementParagraphLeftIndent"
                                        Command="{Binding Path=DecrementParagraphLeftIndentCommand}"
                                        IsTabStop="False"
                                        IsBackgroundVisible="False"
                                        Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/outdent.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadButton>
                                <telerik:RadButton x:Name="buttonIncrementParagraphLeftIndent"
                                        Command="{Binding Path=IncrementParagraphLeftIndentCommand}"
                                        IsTabStop="False"
                                        IsBackgroundVisible="False"
                                        Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/indent.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadButton>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <telerik:RadToggleButton x:Name="buttonBold" Command="{Binding Path=ToggleBoldCommand}" IsTabStop="False" IsBackgroundVisible="False" Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/bold.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton x:Name="buttonItalic" Command="{Binding Path=ToggleItalicCommand}" IsTabStop="False" IsBackgroundVisible="False" Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/italic.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton x:Name="buttonUnderline" Command="{Binding Path=ToggleUnderlineCommand}" IsTabStop="False" IsBackgroundVisible="False" Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/underline.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton x:Name="buttonAlignCenter"
                                        CommandParameter="Center"
                                        Command="{Binding Path=ChangeTextAlignmentCommand}"
                                        IsTabStop="False"
                                        IsBackgroundVisible="False"
                                        Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/aligncenter.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadToggleButton>
                                <telerikColorPickers:FormattingColorPicker x:Name="highlightColorPicker"
                                        ActiveColor="Yellow"
                                        IsTabStop="False"
                                        AutomaticColor="Transparent"
                                        NoColorText="{telerik:LocalizableResource Key=Documents_ColorSelector_Transparent}"
                                        Image="{telerik:IconResource IconRelativePath=16/highlight.png, IconSources={StaticResource IconSources}}"
                                        telerikControlsRTBUI:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontHighlightColorCommand}"
                                        Focusable="False"/>
                                <telerikColorPickers:FormattingColorPicker x:Name="foreColorPicker"
                                        ActiveColor="Red"
                                        IsTabStop="False"
                                        Image="{telerik:IconResource IconRelativePath=16/FontForeColor.png, IconSources={StaticResource IconSources}}"
                                        telerikControlsRTBUI:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontForeColorCommand}"
                                        Focusable="False"/>
                                <telerik:RadToggleButton x:Name="buttonBullets" Command="{Binding Path=ToggleBulletsCommand}" IsTabStop="False" IsBackgroundVisible="False" Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/list-bullets.png, IconSources={StaticResource IconSources}}"/>
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton x:Name="buttonNumbered" Command="{Binding Path=ToggleNumberedCommand}" IsTabStop="False" IsBackgroundVisible="False" Focusable="False">
                                    <Image Source="{telerik:IconResource IconRelativePath=16/list-numbered.png ,IconSources={StaticResource IconSources}}"/>
                                </telerik:RadToggleButton>
                            </StackPanel>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ImageMiniToolBarStyle" TargetType="telerikControlsRTBUI:ImageMiniToolBar" BasedOn="{StaticResource MiniToolbarBaseStyle}">
        <Setter Property="Width" Value="36"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUI:ImageMiniToolBar">
                    <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{StaticResource ImageMiniToolBar_CornerRadius}">
                        <Border BorderBrush="{StaticResource ImageMiniToolBar_InnerBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource ImageMiniToolBar_InnerCornerRadius}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" MinHeight="32"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <StackPanel Margin="2" Orientation="Vertical">
                                    <telerik:RadButton
                                            HorizontalAlignment="Right"
                                            Padding="0"
                                            Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CloseCommand}"
                                            Width="9"
                                            Height="9"
                                            Background="{StaticResource ImageMiniToolBarCloseButton_Background}"
                                            BorderBrush="{StaticResource ImageMiniToolBarCloseButton_BorderBrush}">
                                        <Path
                                                Data="M4 4 L5 4 L5 5 L4 5 z M0 4 L1 4 L1 5 L0 5 z M3 3 L4 3 L4 4 L3 4 z M1 3 L2 3 L2 4 L1 4 z M2 2 L3 2 L3 3 L2 3 z M3 1 L4 1 L4 2 L3 2 z M1 1 L2 1 L2 2 L1 2 z M4 0 L5 0 L5 1 L4 1 z M0 0 L1 0 L1 1 L0 1 z"
                                                Fill="{StaticResource ImageMiniToolBarCloseButton_Foreground}"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Stretch="None"
                                                SnapsToDevicePixels="True"/>
                                    </telerik:RadButton>
                                    <TextBlock
                                            telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_Header"
                                            Foreground="{StaticResource ImageMiniToolBar_Foreground}"
                                            HorizontalAlignment="Center"
                                            Margin="2"
                                            FontSize="10"/>
                                    <Grid HorizontalAlignment="Center" Margin="0 2">
                                        <StackPanel Orientation="Horizontal" Margin="1 1 0 0">
                                            <Rectangle Width="1" Height="1" Fill="{StaticResource ImageMiniToolBar_SeparatorUnderlay}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                            <Rectangle Width="1" Height="1" Fill="{StaticResource ImageMiniToolBar_SeparatorUnderlay}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                            <Rectangle Width="1" Height="1" Fill="{StaticResource ImageMiniToolBar_SeparatorUnderlay}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                            <Rectangle Width="1" Height="1" Fill="{StaticResource ImageMiniToolBar_SeparatorUnderlay}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                        </StackPanel>
                                        <StackPanel Orientation="Horizontal">
                                            <Rectangle Width="1" Height="1" Fill="{StaticResource ImageMiniToolBar_SeparatorOverlay}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                            <Rectangle Width="1" Height="1" Fill="{StaticResource ImageMiniToolBar_SeparatorOverlay}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                            <Rectangle Width="1" Height="1" Fill="{StaticResource ImageMiniToolBar_SeparatorOverlay}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                            <Rectangle Width="1" Height="1" Fill="{StaticResource ImageMiniToolBar_SeparatorOverlay}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                        </StackPanel>
                                    </Grid>
                                    <Border
                                            Height="4"
                                            HorizontalAlignment="Stretch"
                                            OpacityMask="{StaticResource ImageMiniToolBar_ShadowOpacityMask}"
                                            Background="{StaticResource ImageMiniToolBar_ShadowFill}"
                                            UseLayoutRounding="True"
                                            SnapsToDevicePixels="True"/>
                                </StackPanel>
                                <StackPanel Grid.Row="1" Margin="2" UseLayoutRounding="True">
                                    <telerik:RadButton x:Name="btnResize"
                                            Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShowImageEditorDialogCommand}"
                                            CommandParameter="ResizeTool"
                                            IsTabStop="False"
                                            IsBackgroundVisible="False"
                                            VerticalAlignment="Center"
                                            Padding="0"
                                            Margin="0 1"
                                            Width="26"
                                            Height="22"
                                            Focusable="False">
                                        <Image Source="{telerik:IconResource IconRelativePath=resize.png, IconSources={StaticResource IconSourcesImageMiniToolbar}}" Width="16" Height="16"/>
                                        <ToolTipService.ToolTip>
                                            <TextBlock telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_Resize"/>
                                        </ToolTipService.ToolTip>
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="btnRotate"
                                            Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotateCommand}"
                                            CommandParameter="90"
                                            IsTabStop="False"
                                            IsBackgroundVisible="False"
                                            VerticalAlignment="Center"
                                            Padding="0"
                                            Margin="0 1"
                                            Width="26"
                                            Height="22"
                                            Focusable="False">
                                        <Image Source="{telerik:IconResource IconRelativePath=rotate90CW.png, IconSources={StaticResource IconSourcesImageMiniToolbar}}" Width="16" Height="16"/>
                                        <ToolTipService.ToolTip>
                                            <TextBlock telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_Rotate"/>
                                        </ToolTipService.ToolTip>
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="btnCrop"
                                            Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShowImageEditorDialogCommand}"
                                            CommandParameter="CropTool"
                                            IsTabStop="False"
                                            IsBackgroundVisible="False"
                                            VerticalAlignment="Center"
                                            Padding="0"
                                            Margin="0 1"
                                            Width="26"
                                            Height="22"
                                            Focusable="False">
                                        <Image Source="{telerik:IconResource IconRelativePath=crop.png, IconSources={StaticResource IconSourcesImageMiniToolbar}}" Width="16" Height="16"/>
                                        <ToolTipService.ToolTip>
                                            <TextBlock telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_Crop"/>
                                        </ToolTipService.ToolTip>
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="btnBlur"
                                            Margin="0 1"
                                            Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShowImageEditorDialogCommand}"
                                            CommandParameter="BlurTool"
                                            IsTabStop="False"
                                            IsBackgroundVisible="False"
                                            VerticalAlignment="Center"
                                            Padding="0"
                                            Width="26"
                                            Height="22"
                                            Focusable="False">
                                        <Image Source="{telerik:IconResource IconRelativePath=blur.png, IconSources={StaticResource IconSourcesImageMiniToolbar}}" Width="16" Height="16"/>
                                        <ToolTipService.ToolTip>
                                            <TextBlock telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_Blur"/>
                                        </ToolTipService.ToolTip>
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="btnSharpen"
                                            Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShowImageEditorDialogCommand}"
                                            CommandParameter="SharpenTool"
                                            IsTabStop="False"
                                            IsBackgroundVisible="False"
                                            VerticalAlignment="Center"
                                            Padding="0"
                                            Margin="0 1"
                                            Width="26"
                                            Height="22"
                                            Focusable="False">
                                        <Image Source="{telerik:IconResource IconRelativePath=sharpen.png, IconSources={StaticResource IconSourcesImageMiniToolbar}}" Width="16" Height="16"/>
                                        <ToolTipService.ToolTip>
                                            <TextBlock telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_Sharpen"/>
                                        </ToolTipService.ToolTip>
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="btnFlipHorizontal"
                                            Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FlipCommand}"
                                            CommandParameter="Horizontal"
                                            IsTabStop="False"
                                            IsBackgroundVisible="False"
                                            VerticalAlignment="Center"
                                            Padding="0"
                                            Margin="0 1"
                                            Width="26"
                                            Height="22"
                                            Focusable="False">
                                        <Image Source="{telerik:IconResource IconRelativePath=flip_horizontal.png, IconSources={StaticResource IconSourcesImageMiniToolbar}}" Width="16" Height="16"/>
                                        <ToolTipService.ToolTip>
                                            <TextBlock telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_FlipHorizontal"/>
                                        </ToolTipService.ToolTip>
                                    </telerik:RadButton>
                                    <telerik:RadButton x:Name="btnFlipVertical"
                                            Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FlipCommand}"
                                            CommandParameter="Vertical"
                                            IsTabStop="False"
                                            IsBackgroundVisible="False"
                                            VerticalAlignment="Center"
                                            Padding="0"
                                            Margin="0 1"
                                            Width="26"
                                            Height="22"
                                            Focusable="False">
                                        <Image Source="{telerik:IconResource IconRelativePath=flip_vertical.png, IconSources={StaticResource IconSourcesImageMiniToolbar}}" Width="16" Height="16"/>
                                        <ToolTipService.ToolTip>
                                            <TextBlock telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_FlipVertical"/>
                                        </ToolTipService.ToolTip>
                                    </telerik:RadButton>
                                </StackPanel>
                                <Border
                                        Grid.Row="2"
                                        Height="22"
                                        Background="{StaticResource ImageMiniToolBar_FooterBackground}"
                                        CornerRadius="{StaticResource ImageMiniToolBar_FooterCornerRadius}"
                                        Margin="0 0 0 1"
                                        BorderBrush="{StaticResource ImageMiniToolBar_FooterBorderBrush}"
                                        BorderThickness="0 1 0 0"/>
                            </Grid>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikControlsRTBUI:SelectionMiniToolBar" BasedOn="{StaticResource SelectionMiniToolBarStyle}"/>
    <Style TargetType="telerikControlsRTBUI:ImageMiniToolBar" BasedOn="{StaticResource ImageMiniToolBarStyle}"/>
    <Style x:Key="RadRichTextBoxLabelBaseStyle" TargetType="telerik:Label">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Padding" Value="2 3"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="{StaticResource MarkersBrush}"/>
    </Style>
    <Style x:Key="DialogLabelStyle" TargetType="telerikDialogs:DialogLabel" BasedOn="{StaticResource RadRichTextBoxLabelBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikDialogs:DialogLabel">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="HeadingLabelStyle" TargetType="telerikDialogs:HeadingLabel" BasedOn="{StaticResource RadRichTextBoxLabelBaseStyle}">
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikDialogs:HeadingLabel">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRichTextBoxDialogFooterBaseStyle" TargetType="ContentControl">
        <Setter Property="Background" Value="{StaticResource Dialog_FooterBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource Dialog_FooterBorderBrush}"/>
        <Setter Property="BorderThickness" Value="0 1 0 0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
    </Style>
    <Style x:Key="DialogFooterStyle" TargetType="telerikDialogs:DialogFooter" BasedOn="{StaticResource RadRichTextBoxDialogFooterBaseStyle}">
        <Setter Property="MinHeight" Value="30"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikDialogs:DialogFooter">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderBrush="{StaticResource Dialog_FooterInnerBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter/>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ImageEditorDialogFooterStyle" TargetType="telerikDialogs:ImageEditorDialogFooter" BasedOn="{StaticResource RadRichTextBoxDialogFooterBaseStyle}">
        <Setter Property="Height" Value="47"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikDialogs:ImageEditorDialogFooter">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderBrush="{StaticResource ImageEditorDialog_FooterInnerBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter/>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <SolidColorBrush Color="#FF3399FF" x:Key="SelectedColumnBrush"/>
    <Style x:Key="SectionColumnsRadioButtonStyle" TargetType="sectionColumnsUI:SectionColumnsRadioButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sectionColumnsUI:SectionColumnsRadioButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SelectedColumnBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid VerticalAlignment="Center">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Border x:Name="SelectionBorder" BorderBrush="Transparent" BorderThickness="2" Padding="4" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <ContentPresenter x:Name="ImageContentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                            </Border>
                            <ContentPresenter x:Name="Content"
                                    Grid.Row="1"
                                    Margin="{TemplateBinding Padding}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Center"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikDialogs:DialogLabel" BasedOn="{StaticResource DialogLabelStyle}"/>
    <Style TargetType="telerikDialogs:HeadingLabel" BasedOn="{StaticResource HeadingLabelStyle}"/>
    <Style TargetType="telerikDialogs:DialogFooter" BasedOn="{StaticResource DialogFooterStyle}"/>
    <Style TargetType="telerikDialogs:ImageEditorDialogFooter" BasedOn="{StaticResource ImageEditorDialogFooterStyle}"/>
    <Style TargetType="sectionColumnsUI:SectionColumnsRadioButton" BasedOn="{StaticResource SectionColumnsRadioButtonStyle}"/>
    <Style x:Key="ThumbBackgroundStyle" TargetType="Rectangle">
        <Setter Property="Fill" Value="{StaticResource HorizontalMargin_Fill}"/>
    </Style>
    <Style x:Key="PageMarginStyle" TargetType="Rectangle">
        <Setter Property="Fill" Value="{StaticResource HorizontalMargin_Fill}"/>
        <Setter Property="Stroke" Value="{StaticResource HorizontalMargin_Stroke}"/>
        <Setter Property="StrokeThickness" Value="1"/>
    </Style>
    <Style x:Key="HorizontalThumbStyle" TargetType="Thumb">
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property="Margin" Value="-3 0 0 0"/>
        <Setter Property="Width" Value="6"/>
        <Setter Property="Height" Value="14"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Rectangle Fill="Transparent" Width="6" Height="12"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="VerticalThumbStyle" TargetType="Thumb">
        <Setter Property="Cursor" Value="SizeNS"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Width" Value="14"/>
        <Setter Property="Height" Value="6"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Rectangle Fill="Transparent" Width="12" Height="6"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RulerThumbControlTemplate" TargetType="telerikControlsRTBUI:RulerThumb">
        <Grid>
            <ToolTipService.ToolTip>
                <ToolTip Content="{TemplateBinding ToolTipText}"/>
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="ThumbState">
                    <VisualState x:Name="IndentVS">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndentOuter" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndentInner" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="LeftIndentVS">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftIndentOuter" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftIndentInner" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="FirstLineIndentVS">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FirstLineIndentOuter" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FirstLineIndentInner" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="LeftTabStop">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LeftTab" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="RightTabStop">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RightTab" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="CenterTabStop">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CenterTab" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DecimalTabStop">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DecimalTab" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="BarTabStop">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BarTab" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Path x:Name="IndentOuter"
                    Stretch="Fill"
                    Data="M0 4 L4.5 0 9 4 9 8 L0 8 z"
                    Visibility="Collapsed"
                    Height="8"
                    Width="9"
                    RenderTransformOrigin="0.5 0.5"
                    Fill="{StaticResource ParagraphIndent_OuterThumb_Fill}"
                    Stroke="{StaticResource ParagraphIndent_OuterThumb_Stroke}"/>
            <Path x:Name="IndentInner"
                    Stretch="Fill"
                    Data="M0 4 L4.5 0 9 4 9 8 L0 8 z"
                    Visibility="Collapsed"
                    Height="6"
                    Width="7"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"
                    RenderTransformOrigin="0.5 0.5"
                    Fill="{StaticResource ParagraphIndent_InnerThumb_Fill}"
                    Stroke="{StaticResource ParagraphIndent_InnerThumb_Stroke}"/>
            <Path x:Name="FirstLineIndentOuter"
                    Stretch="Fill"
                    Data="M0 4 L4.5 0 9 4 9 8 L0 8 z"
                    RenderTransformOrigin="0.5 0.5"
                    Fill="{StaticResource ParagraphIndent_OuterThumb_Fill}"
                    Height="8"
                    Width="9"
                    Visibility="Collapsed"
                    Stroke="{StaticResource ParagraphIndent_OuterThumb_Stroke}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                <Path.RenderTransform>
                    <RotateTransform Angle="180"/>
                </Path.RenderTransform>
            </Path>
            <Path x:Name="FirstLineIndentInner"
                    Stretch="Fill"
                    Data="M0 4 L4.5 0 9 4 9 8 L0 8 z"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Width="7"
                    Height="6"
                    Visibility="Collapsed"
                    Fill="{StaticResource ParagraphIndent_InnerThumb_Fill}"
                    Stroke="{StaticResource ParagraphIndent_InnerThumb_Stroke}"
                    RenderTransformOrigin="0.5 0.5">
                <Path.RenderTransform>
                    <RotateTransform Angle="180"/>
                </Path.RenderTransform>
            </Path>
            <Rectangle x:Name="LeftIndentOuter"
                    Fill="{StaticResource ParagraphIndent_OuterThumb_Fill}"
                    Stroke="{StaticResource ParagraphIndent_OuterThumb_Stroke}"
                    Width="9"
                    Height="5"
                    Visibility="Collapsed"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            <Rectangle x:Name="LeftIndentInner"
                    Fill="{StaticResource ParagraphIndent_InnerThumb_Fill}"
                    Stroke="{StaticResource ParagraphIndent_InnerThumb_Stroke}"
                    Width="7"
                    Height="3"
                    Visibility="Collapsed"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            <Path x:Name="LeftTab"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Foreground}"
                    Stretch="None"
                    UseLayoutRounding="True"
                    Data="M0 0 L2 0 L2 3 L5 3 L5 5 L2 5 L0 5 L0 3 z"
                    SnapsToDevicePixels="True"/>
            <Path x:Name="RightTab"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Foreground}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    UseLayoutRounding="True"
                    Stretch="None"
                    Data="M3,0 5,0 5,5 0,5 0,3 3,3z"
                    SnapsToDevicePixels="True"/>
            <Path x:Name="CenterTab"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Foreground}"
                    Stretch="None"
                    UseLayoutRounding="True"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Data="M0,3 3,3 3,0 5,0 5,3 8,3 8,5 0,5z"
                    SnapsToDevicePixels="True"/>
            <Path x:Name="DecimalTab"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Foreground}"
                    UseLayoutRounding="True"
                    Stretch="None"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Data="M0,3 3,3 3,0 5,0 5,3 8,3 8,5 0,5z M6,0 8,0 8,2 6,2z"
                    SnapsToDevicePixels="True"/>
            <Path x:Name="BarTab"
                    Visibility="Collapsed"
                    Data="M0 0 L5 0 L5 2 L0 2 z"
                    Fill="{TemplateBinding Foreground}"
                    UseLayoutRounding="True"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Stretch="Fill"
                    Width="2"
                    Height="5"
                    SnapsToDevicePixels="True"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RulerThumbBaseStyle" TargetType="telerikControlsRTBUI:RulerThumb">
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="Margin" Value="-4 9 0 0"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="{StaticResource TabStopForeground}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Template" Value="{StaticResource RulerThumbControlTemplate}"/>
    </Style>
    <Style x:Key="RulerThumbStyle" TargetType="telerikControlsRTBUI:RulerThumb" BasedOn="{StaticResource RulerThumbBaseStyle}"/>
    <Style x:Key="HangingIndentThumbStyle" TargetType="telerikControlsRTBUI:RulerThumb" BasedOn="{StaticResource RulerThumbBaseStyle}">
        <Setter Property="Margin" Value="-4 7 0 0"/>
    </Style>
    <Style x:Key="FirstLineIndentThumbStyle" TargetType="telerikControlsRTBUI:RulerThumb" BasedOn="{StaticResource RulerThumbBaseStyle}">
        <Setter Property="Margin" Value="-4 0 0 0"/>
    </Style>
    <Style x:Key="LeftIndentThumbStyle" TargetType="telerikControlsRTBUI:RulerThumb" BasedOn="{StaticResource RulerThumbBaseStyle}">
        <Setter Property="Margin" Value="-4 13 0 0"/>
    </Style>
    <Style x:Key="RightIndentThumbStyle" TargetType="telerikControlsRTBUI:RulerThumb" BasedOn="{StaticResource RulerThumbBaseStyle}">
        <Setter Property="Margin" Value="-4 7 0 0"/>
    </Style>
    <Style TargetType="Thumb" x:Key="TableColumnThumbStyle">
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid Background="{TemplateBinding Background}" Margin="-3 3 0 0">
                        <Border Background="{StaticResource ColumnResizeThumbStyle_GridLinesFill}"/>
                        <Border
                                Height="1"
                                Margin="0 1 0 0"
                                VerticalAlignment="Top"
                                Background="{StaticResource ColumnResizeThumbStyle_GridLinesStroke}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 3 0 0"
                                VerticalAlignment="Top"
                                Background="{StaticResource ColumnResizeThumbStyle_GridLinesStroke}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 5 0 0"
                                VerticalAlignment="Top"
                                Background="{StaticResource ColumnResizeThumbStyle_GridLinesStroke}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 7 0 0"
                                VerticalAlignment="Top"
                                Background="{StaticResource ColumnResizeThumbStyle_GridLinesStroke}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="1 0 0 0"
                                Width="1"
                                Background="{StaticResource ColumnResizeThumbStyle_GridLinesStroke}"
                                UseLayoutRounding="False"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="3 0 0 0"
                                Width="1"
                                Background="{StaticResource ColumnResizeThumbStyle_GridLinesStroke}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="5 0 0 0"
                                Width="1"
                                Background="{StaticResource ColumnResizeThumbStyle_GridLinesStroke}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="Thumb" x:Key="SectionColumnThumbStyle">
        <Setter Property="Cursor" Value="SizeWE"/>
        <Setter Property="Background" Value="{StaticResource HorizontalMargin_Fill}"/>
        <Setter Property="Foreground" Value="{StaticResource MarkersBrush}"/>
        <Setter Property="Height" Value="14"/>
        <Setter Property="Width" Value="10"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid Background="{TemplateBinding Background}" Width="{TemplateBinding Width}" Margin="-5 1 0 1">
                        <Border BorderBrush="{StaticResource HorizontalMargin_Stroke}" BorderThickness="1">
                            <Path
                                    Data="M0,0 L3,0 L3,1 L1,1 L1,8 L0,8 z"
                                    HorizontalAlignment="Left"
                                    Height="8"
                                    Width="3"
                                    Margin="2"
                                    Stretch="Fill"
                                    UseLayoutRounding="False"
                                    VerticalAlignment="Top"
                                    Fill="{TemplateBinding Foreground}"/>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DocumentRulerBaseStyle" TargetType="telerikControlsRTBUI:DocumentRulerBase">
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MarkersBrush" Value="{StaticResource MarkersBrush}"/>
        <Setter Property="HorizontalThumbStyle" Value="{StaticResource HorizontalThumbStyle}"/>
        <Setter Property="VerticalThumbStyle" Value="{StaticResource VerticalThumbStyle}"/>
        <Setter Property="ThumbBackgroundStyle" Value="{StaticResource ThumbBackgroundStyle}"/>
        <Setter Property="TableColumnThumbStyle" Value="{StaticResource TableColumnThumbStyle}"/>
        <Setter Property="SectionColumnThumbStyle" Value="{StaticResource SectionColumnThumbStyle}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUI:DocumentRulerBase">
                    <Grid x:Name="PART_LayoutRoot">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="24"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="24"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <ContentPresenter Grid.Column="1" Grid.Row="1"/>
                        <Canvas x:Name="PART_HorizontalCanvas" Grid.Column="1" Background="{StaticResource HorizontalCanvasBackground}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <Grid x:Name="PART_HorizontalRulerContainer" Height="19" Margin="0 5 0 0">
                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                    <RowDefinition Height="5"/>
                                </Grid.RowDefinitions>
                                <Canvas>
                                    <Rectangle x:Name="PART_LeftMarginRectangle" Style="{StaticResource PageMarginStyle}" Height="14"/>
                                    <Rectangle x:Name="PART_PageHorizontalRectangle"
                                            Fill="{StaticResource HorizontalRuler_Background}"
                                            Canvas.Left="0"
                                            Canvas.Top="0"
                                            Height="14"
                                            Stroke="{StaticResource HorizontalRuler_Stroke}"
                                            StrokeThickness="1"/>
                                    <Rectangle x:Name="PART_RightMarginRectangle" Style="{StaticResource PageMarginStyle}" Height="14"/>
                                </Canvas>
                                <Canvas x:Name="PART_HorizontalMarkersContainer"/>
                                <Canvas x:Name="PART_HorizontalThumbBackgroundsContainer"/>
                                <Canvas x:Name="PART_HorizontalThumbsContainer" Canvas.ZIndex="10">
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_ParagraphFirstLineIndent"
                                            RulerThumbType="FirstLineIndent"
                                            Canvas.ZIndex="10"
                                            ToolTipText="First Line Indent"
                                            Style="{StaticResource FirstLineIndentThumbStyle}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_ParagraphHangingIndent" RulerThumbType="Indent" Canvas.ZIndex="10" ToolTipText="Hanging Indent" Style="{StaticResource HangingIndentThumbStyle}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_ParagraphLeftIndent" RulerThumbType="LeftIndent" Canvas.ZIndex="10" ToolTipText="Left Indent" Style="{StaticResource LeftIndentThumbStyle}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_ParagraphRightIndent" Canvas.ZIndex="10" ToolTipText="Right Indent" Style="{StaticResource RightIndentThumbStyle}" RulerThumbType="Indent"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_TabStopMarker" Canvas.ZIndex="0" Foreground="{StaticResource TabStopMarker_LightForeground}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_FirstLineIndentMarker" RulerThumbType="FirstLineIndent" Canvas.ZIndex="0" Style="{StaticResource FirstLineIndentThumbStyle}" Opacity="0.5"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_IndentMarker" RulerThumbType="Indent" Canvas.ZIndex="0" Style="{StaticResource HangingIndentThumbStyle}" Opacity="0.5"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_LeftIndentMarker" RulerThumbType="LeftIndent" Canvas.ZIndex="0" Style="{StaticResource LeftIndentThumbStyle}" Opacity="0.5"/>
                                </Canvas>
                                <Canvas x:Name="PART_TabStopMarkersContainer" Grid.Row="1" Height="5"/>
                            </Grid>
                        </Canvas>
                        <Canvas x:Name="PART_VerticalCanvas" Grid.Row="1" Background="{StaticResource VerticalCanvasBackground}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <Grid Grid.Row="1" x:Name="PART_VerticalRulerContainer" Margin="5 0" Width="14">
                                <Canvas>
                                    <Rectangle x:Name="PART_TopMarginRectangle" Style="{StaticResource PageMarginStyle}" Width="14"/>
                                    <Rectangle x:Name="PART_PageVerticalRectangle"
                                            Fill="{StaticResource VerticalRuler_Background}"
                                            Canvas.Left="0"
                                            Canvas.Top="0"
                                            Width="14"
                                            Stroke="{StaticResource HorizontalRuler_Stroke}"
                                            StrokeThickness="1"/>
                                    <Rectangle x:Name="PART_BottomMarginRectangle" Style="{StaticResource PageMarginStyle}" Width="14"/>
                                </Canvas>
                                <Canvas x:Name="PART_VerticalMarkersContainer"/>
                                <Canvas x:Name="PART_VerticalThumbBackgroundsContainer"/>
                                <Canvas x:Name="PART_VerticalThumbsContainer"/>
                            </Grid>
                        </Canvas>
                        <Border Background="{StaticResource TopLeftRectangle_Fill}" BorderBrush="{StaticResource TopLeftRectangle_Stroke}" BorderThickness="1">
                            <Border x:Name="PART_TabStops"
                                    Background="{StaticResource TabStopsBorder_Background}"
                                    BorderBrush="{StaticResource TabStopsBorder_BorderBrush}"
                                    BorderThickness="1"
                                    Width="14"
                                    Height="14">
                                <telerikControlsRTBUI:RulerThumb x:Name="PART_RulerThumbTypeSelector" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0" IsHitTestVisible="False"/>
                            </Border>
                        </Border>
                        <Line x:Name="PART_MarkLine" Grid.Row="1" Grid.Column="1" Stroke="{StaticResource MarkLine_Stroke}" StrokeThickness="1" StrokeDashArray="1 1 1 1 1 3" Margin="0 2 0 0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="LayoutModeSelectorStyle" TargetType="telerikControlsRTBUIStatusBar:LayoutModeSelector">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUIStatusBar:LayoutModeSelector">
                    <StackPanel x:Name="LayoutRoot" Orientation="Horizontal" UseLayoutRounding="True">
                        <telerik:RadToggleButton x:Name="btnPrintLayout" IsTabStop="False" IsBackgroundVisible="False" VerticalAlignment="Center" Width="22" Height="20" Focusable="False">
                            <Image Stretch="None" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/StatusBar/print_layout.png"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton x:Name="btnWebLayout" Margin="4 0 0 0" IsTabStop="False" IsBackgroundVisible="False" VerticalAlignment="Center" Width="22" Height="20" Focusable="False">
                            <Image Stretch="None" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/StatusBar/web_layout.png"/>
                        </telerik:RadToggleButton>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ContentControl" x:Key="TrackPredefinedStyle">
        <Setter Property="Height" Value="2"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <StackPanel>
                        <Border BorderThickness="1" BorderBrush="{StaticResource SliderDarkerBrush}" Height="1"/>
                        <Border BorderThickness="1" BorderBrush="{StaticResource SliderLighterBrush}" Height="1"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ThumbPredefinedStyle" TargetType="Thumb">
        <Setter Property="Width" Value="10"/>
        <Setter Property="Height" Value="14"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="{StaticResource ZoomInOutButtonBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ZoomInOutButtonForegroundBrush}"/>
        <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="ZoomIndicator" Storyboard.TargetProperty="Fill" Duration="0:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Highlighted}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ZoomIndicator" Storyboard.TargetProperty="Stroke" Duration="0:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlSubItem_OuterBorder_Selected}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ZoomIndicator" Storyboard.TargetProperty="Fill" Duration="0:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlSubItem_Background_Selected}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ZoomIndicator" Storyboard.TargetProperty="Stroke" Duration="0:0:0">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Focused}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Path x:Name="ZoomIndicator"
                                Data="M0.0,0 L10.0,0 L10.0,10 L9.9,10 L5,17.9 L0.0,10 L0.0,10 L0.0,9.9 L0,9.9 L0.0,9.9 z"
                                Fill="{TemplateBinding Background}"
                                Stroke="{TemplateBinding BorderBrush}"
                                StrokeThickness="{TemplateBinding BorderThickness}"
                                Width="{TemplateBinding Width}"
                                Height="{TemplateBinding Height}"
                                Stretch="Fill"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="NonLinearSliderStyle" TargetType="telerikControlsRTBUIStatusBar:NonLinearSlider">
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUIStatusBar:NonLinearSlider">
                    <Grid x:Name="LayoutRoot">
                        <telerik:RadSlider x:Name="slider"
                                Minimum="0"
                                Maximum="1"
                                LargeChange="0.05"
                                SmallChange="0.005"
                                TrackStyle="{StaticResource TrackPredefinedStyle}"
                                ThumbStyle="{StaticResource ThumbPredefinedStyle}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PercentComboBoxStyle" TargetType="telerikControlsRTBUIStatusBar:PercentComboBox">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUIStatusBar:PercentComboBox">
                    <Grid x:Name="LayoutRoot">
                        <telerik:RadComboBox x:Name="comboPercent" IsEditable="True" SelectedIndex="3" IsTextSearchEnabled="False" VerticalAlignment="Center" MinHeight="20">
                            <telerik:RadComboBoxItem Content="25%"/>
                            <telerik:RadComboBoxItem Content="50%"/>
                            <telerik:RadComboBoxItem Content="75%"/>
                            <telerik:RadComboBoxItem Content="100%"/>
                            <telerik:RadComboBoxItem Content="150%"/>
                            <telerik:RadComboBoxItem Content="200%"/>
                            <telerik:RadComboBoxItem Content="500%"/>
                        </telerik:RadComboBox>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ZoomControllerStyle" TargetType="telerikControlsRTBUIStatusBar:ZoomController">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUIStatusBar:ZoomController">
                    <Grid x:Name="LayoutRoot">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="61"/>
                            <ColumnDefinition Width="4"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*" MinWidth="120"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <telerikControlsRTBUIStatusBar:PercentComboBox x:Name="comboZoom"/>
                        <telerik:RadButton
                                Grid.Column="2"
                                x:Name="buttonZoomOut"
                                Height="16"
                                Width="16"
                                CornerRadius="15"
                                Background="{StaticResource ZoomInOutButtonBackgroundBrush}"
                                BorderBrush="{StaticResource ZoomInOutButtonBorderBrush}">
                            <Path Data="M461.1,217.7 L469.3,217.7" Stretch="Fill" Stroke="{StaticResource ZoomInOutButtonForegroundBrush}" StrokeThickness="2" Width="10" Height="2"/>
                        </telerik:RadButton>
                        <telerikControlsRTBUIStatusBar:NonLinearSlider x:Name="sliderZoom" VerticalAlignment="Center" Grid.Column="3"/>
                        <telerik:RadButton
                                Grid.Column="4"
                                x:Name="buttonZoomIn"
                                Height="16"
                                Width="16"
                                CornerRadius="15"
                                Background="{StaticResource ZoomInOutButtonBackgroundBrush}"
                                BorderBrush="{StaticResource ZoomInOutButtonBorderBrush}">
                            <Grid>
                                <Path Data="M374,105 L374,167.5" Stretch="Fill" StrokeThickness="2" Stroke="{StaticResource ZoomInOutButtonForegroundBrush}" Width="2" Height="10"/>
                                <Path Data="M461.1,217.7 L469.3,217.7" Stretch="Fill" Stroke="{StaticResource ZoomInOutButtonForegroundBrush}" StrokeThickness="2" Width="10" Height="2"/>
                            </Grid>
                        </telerik:RadButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRichTextBoxStatusBarStyle" TargetType="telerikControlsRTBUI:RadRichTextBoxStatusBar">
        <Setter Property="Background" Value="{StaticResource RadRichTextBoxStatusBar_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource RadRichTextBoxStatusBar_BorderBrush}"/>
        <Setter Property="Height" Value="28"/>
        <Setter Property="BorderThickness" Value="0 1 0 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUI:RadRichTextBoxStatusBar">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
                        <Grid x:Name="LayoutRoot" VerticalAlignment="Center" HorizontalAlignment="Right">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <telerikControlsRTBUIStatusBar:LayoutModeSelector x:Name="layoutModeSelector" Margin="0 0 6 0" VerticalAlignment="Center"/>
                            <telerikControlsRTBUIStatusBar:ZoomController x:Name="zoomController" Grid.Column="1" Margin="0 0 6 0"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ActionButtonStyle" TargetType="telerik:RadRibbonToggleButton">
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadRibbonToggleButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0.5"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedBorder" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="TextAlignment">
                                <VisualState x:Name="TextAtBottom"/>
                                <VisualState x:Name="TextAtRight"/>
                                <VisualState x:Name="TextHide"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                                Margin="1 0"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"/>
                        <telerikChromes:ButtonChrome x:Name="chrome"
                                RenderNormal="False"
                                Margin="1 1 1 0"
                                MinHeight="{TemplateBinding MinHeight}"
                                RenderHighlighted="{TemplateBinding IsMouseOver}"
                                RenderEnabled="{TemplateBinding IsEnabled}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                        <Border x:Name="CheckedBorder"
                                Background="{StaticResource CheckedBorderBackground}"
                                BorderBrush="{StaticResource CheckedBorderBrush}"
                                BorderThickness="1"
                                MinHeight="{TemplateBinding MinHeight}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                                Visibility="Collapsed"/>
                        <ContentPresenter x:Name="contentPresenter"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MultipleUndoControlStyle" TargetType="telerikControlsRTBUI:MultipleUndoControl">
        <Setter Property="MinWidth" Value="120"/>
        <Setter Property="ActionButtonStyle" Value="{StaticResource ActionButtonStyle}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUI:MultipleUndoControl">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <StackPanel x:Name="actionButtonsPanel"/>
                        <telerik:RadButton x:Name="textBlockMultipleUndoActionsContent"
                                Grid.Row="1"
                                Margin="{StaticResource MultipleUndoControl_ButtonMargin}"
                                ClickMode="Press"
                                BorderThickness="0 1 0 0"
                                HorizontalContentAlignment="Center"
                                MinHeight="22"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikControlsRTBUI:RulerThumb" BasedOn="{StaticResource RulerThumbStyle}"/>
    <Style TargetType="telerikControlsRTBUI:DocumentRulerBase" BasedOn="{StaticResource DocumentRulerBaseStyle}"/>
    <Style TargetType="telerikControlsRTBUI:DocumentRuler" BasedOn="{StaticResource DocumentRulerBaseStyle}"/>
    <Style TargetType="telerikControlsRTBUIStatusBar:LayoutModeSelector" BasedOn="{StaticResource LayoutModeSelectorStyle}"/>
    <Style TargetType="telerikControlsRTBUIStatusBar:NonLinearSlider" BasedOn="{StaticResource NonLinearSliderStyle}"/>
    <Style TargetType="telerikControlsRTBUIStatusBar:PercentComboBox" BasedOn="{StaticResource PercentComboBoxStyle}"/>
    <Style TargetType="telerikControlsRTBUIStatusBar:ZoomController" BasedOn="{StaticResource ZoomControllerStyle}"/>
    <Style TargetType="telerikControlsRTBUI:RadRichTextBoxStatusBar" BasedOn="{StaticResource RadRichTextBoxStatusBarStyle}"/>
    <Style TargetType="telerikControlsRTBUI:MultipleUndoControl" BasedOn="{StaticResource MultipleUndoControlStyle}"/>
    <Style TargetType="telerikControlsRTBUI:RadRichTextBoxRibbonUI" BasedOn="{StaticResource RadRibbonViewStyle}"/>
</ResourceDictionary>
