<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">
    <ResourceDictionary.MergedDictionaries>
        <telerik:Windows8ResourceDictionary/>
    </ResourceDictionary.MergedDictionaries>
    <SolidColorBrush x:Key="MarkersBrush" Color="Black"/>
    <telerik1:ColorToBrushConverter x:Key="converter"/>
    <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
    <SolidColorBrush x:Key="TransparentBrush" Color="#01FFFFFF"/>
    <CornerRadius x:Key="ValidationTooltip_CornerRadius">0</CornerRadius>
    <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>
            <Grid>
                <Path
                        Width="4"
                        Height="8"
                        Data="M4,0 L0,4 4,8Z"
                        Stretch="None"
                        Fill="{telerik1:Windows8Resource ResourceKey=ValidationBrush}"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"/>
                <Border Background="{telerik1:Windows8Resource ResourceKey=ValidationBrush}" Margin="4 0 0 0" Padding="1">
                    <ContentPresenter Content="{Binding ErrorContent}" TextBlock.Foreground="{telerik1:Windows8Resource ResourceKey=MainBrush}" Margin="4 2"/>
                </Border>
            </Grid>
            <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="{telerik1:Windows8Resource ResourceKey=ValidationBrush}" BorderThickness="1" CornerRadius="{StaticResource ValidationTooltip_CornerRadius}"/>
            <Path Data="M0,2 L5,2 5,7 Z" Fill="{telerik1:Windows8Resource ResourceKey=ValidationBrush}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <ToolTipService.ToolTip>
                <ToolTip x:Name="PART_ToolTip"
                        DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=PlacementTarget.DataContext}"
                        Template="{StaticResource ErrorTooltipTemplate}"
                        Placement="Right"/>
            </ToolTipService.ToolTip>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="0"/>
        <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="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OuterMouseOverBorder"/>
                                        <DoubleAnimation To="-1" Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"/>
                                        <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.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </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>
                                    </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 x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=BasicBrush}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
                        <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">
                            <ContentPresenter.RenderTransform>
                                <TranslateTransform/>
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                        <Border x:Name="FocusVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Visibility="Collapsed"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"
                                Opacity="0.2"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadPathButtonPathStyle" TargetType="Path">
        <Setter Property="Fill" Value="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
        <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="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="0"/>
        <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="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OuterMouseOverBorder"/>
                                        <DoubleAnimation To="-1" Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"/>
                                        <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.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Path" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </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>
                                    </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 x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=BasicBrush}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
                        <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">
                                    <ContentPresenter.RenderTransform>
                                        <TranslateTransform/>
                                    </ContentPresenter.RenderTransform>
                                </ContentPresenter>
                            </Grid>
                        </Grid>
                        <Border x:Name="FocusVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Visibility="Collapsed"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"
                                Opacity="0.2"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadToggleButtonStyle" TargetType="telerik1:RadToggleButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadToggleButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterMouseOverBorder" Storyboard.TargetProperty="Opacity" To="0.15"/>
                                        <DoubleAnimation To="-1" Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"/>
                                        <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.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </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>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverCheckedVisual" Storyboard.TargetProperty="Opacity" To="0.2"/>
                                    </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>
                                    </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"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </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 x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
                        <Border x:Name="FocusVisual"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"
                                Opacity="0.2"/>
                        <Border x:Name="CheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=AccentBrush}"
                                Background="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
                        <Border x:Name="MouseOverCheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=MainBrush}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                        <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">
                            <ContentPresenter.RenderTransform>
                                <TranslateTransform/>
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRadioButtonStyle" TargetType="telerik1:RadRadioButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadRadioButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation To="0.15" Duration="0" Storyboard.TargetName="OuterMouseOverBorder" Storyboard.TargetProperty="Opacity"/>
                                        <DoubleAnimation To="-1" Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"/>
                                        <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.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </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>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverCheckedVisual" Storyboard.TargetProperty="Opacity" To="0.2"/>
                                    </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>
                                    </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"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </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 x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
                        <Border x:Name="FocusVisual"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"
                                Opacity="0.2"/>
                        <Border x:Name="CheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=AccentBrush}"
                                Background="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
                        <Border x:Name="MouseOverCheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=MainBrush}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                        <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">
                            <ContentPresenter.RenderTransform>
                                <TranslateTransform/>
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadDropDownButtonStyle" TargetType="telerik1:RadDropDownButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="0"/>
        <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="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="OuterMouseOverBorder"/>
                                        <DoubleAnimation To="-1" Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"/>
                                        <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.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                        <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>
                                    </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"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <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 x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
                        <Border x:Name="CheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=AccentBrush}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
                        <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">
                                <ContentPresenter.RenderTransform>
                                    <TranslateTransform/>
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter>
                            <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 x:Name="Path" Data="M0,0 L6,0 L3,4 z" Fill="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
                            </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="{telerik1:Windows8Resource ResourceKey=MainBrush}"
                                        BorderBrush="{telerik1:Windows8Resource ResourceKey=BasicBrush}">
                                    <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="FocusVisual"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"
                                Opacity="0.2"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadSplitButtonToggleButtonStyle" BasedOn="{StaticResource RadToggleButtonStyle}" TargetType="telerik1:RadToggleButton">
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="Padding" Value="0"/>
        <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="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterMouseOverBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="OuterMouseOverBorder" Storyboard.TargetProperty="Opacity" To="0.15"/>
                                        <DoubleAnimation To="-1" Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"/>
                                        <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.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </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>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverCheckedVisual" Storyboard.TargetProperty="Opacity" To="0.2"/>
                                    </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>
                                    </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 x:Name="OuterMouseOverBorder"
                                Opacity="0"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
                        <Border x:Name="OuterPressedBorder"
                                Visibility="Collapsed"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
                        <Border x:Name="FocusVisual"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"
                                Opacity="0.2"/>
                        <Border x:Name="CheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=AccentBrush}"
                                Background="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
                        <Border x:Name="MouseOverCheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{telerik1:Windows8Resource ResourceKey=MainBrush}"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                        <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">
                            <ContentPresenter.RenderTransform>
                                <TranslateTransform/>
                            </ContentPresenter.RenderTransform>
                        </ContentPresenter>
                    </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="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="CornerRadius" Value="0"/>
        <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/>
                                </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 Duration="0" Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
                                        </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>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropDownButtonAtTop">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>0</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 0 0 -1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropDownButtonAtRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>-1 0 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DropDownButtonAtBottom">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Column)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>1</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="(Grid.Row)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Int32>2</sys:Int32>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Margin" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0 -1 0 0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ButtonPartVisibility">
                                <VisualState x:Name="ButtonInvisible">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="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>0.2</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}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    Focusable="False"/>
                            <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"
                                    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 x:Name="Path" Fill="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}" Data="M0,0 L6,0 L3,4 z" Margin="5 3"/>
                                </Grid>
                            </telerik1:RadToggleButton>
                        </Grid>
                        <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="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
                        </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="{telerik1:Windows8Resource ResourceKey=MainBrush}"
                                        BorderBrush="{telerik1:Windows8Resource ResourceKey=BasicBrush}">
                                    <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}"/>
    <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}"/>
    <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="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="Path" Storyboard.TargetProperty="Opacity" To="0.5"/>
                        </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>
            <Path
                    Fill="{telerik1:Windows8Resource ResourceKey=StrongBrush}"
                    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="4"/>
            <Border x:Name="FocusVisual" Visibility="Collapsed" BorderThickness="1" BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}" Opacity="0.2"/>
        </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="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="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="6"/>
        <Setter Property="Height" Value="7"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
        <Setter Property="Focusable" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid x:Name="Root">
                        <Grid.RenderTransform>
                            <ScaleTransform x:Name="zoomX" CenterX="3" CenterY="3"/>
                        </Grid.RenderTransform>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation To="2" Storyboard.TargetName="zoomX" Storyboard.TargetProperty="ScaleX" Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation To="2" Storyboard.TargetName="zoomX" Storyboard.TargetProperty="ScaleX" Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled"/>
                            </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}" Margin="1 0"/>
                        <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{x:Null}" Background="{x:Null}" Margin="1 0"/>
                        <Border x:Name="FocusVisual" BorderThickness="1" Visibility="Collapsed" BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}" Margin="1 0" Opacity="0.2"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="Thumb" x:Key="SelectionMiddleThumbStyle">
        <Setter Property="Height" Value="3"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <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/>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard/>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Root"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DataTemplate x:Key="DefaultTicksTemplate">
        <Rectangle Width="1" ToolTipService.ToolTip="{Binding}" Height="5" Fill="{telerik1:Windows8Resource ResourceKey=StrongBrush}"/>
    </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="Height" Value="3"/>
        <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}"/>
                </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="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Background" Value="{telerik1:Windows8Resource ResourceKey=BasicBrush}"/>
        <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}"/>
    <localization:CultureToLocalizationStringConverter x:Key="cultureConverter"/>
    <telerik1:LocalizationManager x:Key="localizationManager"/>
    <Style TargetType="telerik1:RadButton" x:Key="RadColorPicker_HeaderButtonStyle">
        <Setter Property="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" 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="0.15"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="PressedVisual" 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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                                BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                                BorderThickness="0 0 1 0"/>
                        <Border x:Name="MouseOverVisual" Grid.ColumnSpan="2" Opacity="0" Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                        <Border x:Name="PressedVisual" Grid.ColumnSpan="2" Opacity="0" Background="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>

                        <!-- this x:Name is called from code -->
                        <Border x:Name="rectangleborder" BorderBrush="{TemplateBinding BorderBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2 2 3 2">
                            <Rectangle
                                    Fill="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                    VerticalAlignment="Center"
                                    Stroke="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                    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="0.2"/>
                                    </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="{telerik:Windows8Resource ResourceKey=BasicBrush}">
                            <Border BorderThickness="1" x:Name="InnerborderContent"/>
                        </Border>
                        <Border x:Name="MouseOverVisual"
                                MinHeight="13"
                                MinWidth="13"
                                VerticalAlignment="Stretch"
                                BorderThickness="1"
                                Opacity="0"
                                BorderBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                        <Border x:Name="SelectedVisual"
                                MinHeight="13"
                                MinWidth="13"
                                VerticalAlignment="Stretch"
                                Opacity="0"
                                BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                                BorderThickness="2"/>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                MinHeight="13"
                                MinWidth="13"
                                BorderThickness="1"
                                VerticalAlignment="Stretch"
                                BorderBrush="{telerik1:Windows8Resource ResourceKey=MarkerBrush}"
                                SnapsToDevicePixels="True"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadColorPaletteViewStyle" TargetType="telerikInput:RadColorPaletteView">
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput:RadColorSelector">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <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}"
                                    FontSize="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
                            <Border
                                    Grid.Row="1"
                                    Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                                    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="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                                    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="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                                    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>
                </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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="Background" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8Resource ResourceKey=FontFamily}"/>
        <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}"/>
    <ControlTemplate x:Key="NonEditableComboToggleButtonControlTemplate" TargetType="telerik:RadToggleButton">
        <Grid Background="{StaticResource TransparentBrush}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ToggleButtonBackgroundChecked">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ToggleButtonBackgroundChecked">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="ToggleButtonBackground" Storyboard.TargetProperty="Opacity" To="0.5"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Opacity" To="0.3"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckedStates">
                    <VisualState x:Name="Unchecked"/>
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ToggleButtonBackgroundChecked">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Indeterminate"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="ToggleButtonBackground"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="ToggleButtonBackgroundChecked"
                    Grid.ColumnSpan="2"
                    Opacity="0.15"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    Visibility="Collapsed"/>
            <Border x:Name="FocusVisual" Grid.ColumnSpan="2" Visibility="Collapsed" BorderThickness="1" Opacity="0.2" BorderBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <Path x:Name="DropDownIcon"
                    Grid.Column="1"
                    Data="M0,0 L6,0 L3,4 z"
                    Stretch="Fill"
                    Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    Width="6"
                    Height="4"
                    Margin="5 0"/>
            <ContentPresenter x:Name="Content"
                    TextBlock.Foreground="{TemplateBinding Foreground}"
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                <ContentPresenter.Resources>
                    <Style TargetType="TextBlock">
                        <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
                    </Style>
                </ContentPresenter.Resources>
            </ContentPresenter>
        </Grid>
    </ControlTemplate>
    <Style x:Key="NonEditableComboToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Template" Value="{StaticResource NonEditableComboToggleButtonControlTemplate}"/>
    </Style>
    <ControlTemplate x:Key="EditableComboToggleButtonControlTemplate" TargetType="telerik:RadToggleButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ToggleButtonBackground" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="ToggleButtonBackground" Storyboard.TargetProperty="Opacity" To="0.15"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ToggleButtonBackground" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard/>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckedStates">
                    <VisualState x:Name="Unchecked"/>
                    <VisualState x:Name="Checked"/>
                    <VisualState x:Name="Indeterminate"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ToggleButtonBackground" Grid.ColumnSpan="2" Background="{TemplateBinding Background}"/>
            <Border Grid.ColumnSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <Path x:Name="DropDownIcon"
                    Grid.Column="1"
                    Data="M0,0 L6,0 L3,4 z"
                    Stretch="Fill"
                    Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    Width="6"
                    Height="4"
                    Margin="5 0"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="EditableComboToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Template" Value="{StaticResource EditableComboToggleButtonControlTemplate}"/>
    </Style>
    <Style x:Key="ComboBoxTextBoxStyle" TargetType="TextBox">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <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>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PART_EditableTextBox" Storyboard.TargetProperty="Opacity" To="0.3"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="0.5"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0.5"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Opacity" To="0.5"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Watermark" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DropDownOpenBorder">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownOpenBorder" Storyboard.TargetProperty="BorderBrush">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownOpen">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="FocusBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DropDownOpenBorder">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusBorder">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="WatermarkStates">
                    <VisualState x:Name="WatermarkVisible">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Watermark" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="WatermarkInvisible"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="Background" Grid.ColumnSpan="2" IsHitTestVisible="False" Background="{TemplateBinding Background}"/>
            <TextBox x:Name="PART_EditableTextBox"
                    Grid.Column="0"
                    Margin="1 1 0 1"
                    VerticalAlignment="Stretch"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    VerticalContentAlignment="Center"
                    Style="{StaticResource ComboBoxTextBoxStyle}">
                <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>
            <telerik:RadToggleButton x:Name="PART_DropDownButton"
                    Grid.Column="1"
                    IsTabStop="False"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Style="{StaticResource EditableComboToggleButtonStyle}"
                    ClickMode="Press"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="Transparent"/>
            <Border x:Name="Border" Grid.ColumnSpan="2" IsHitTestVisible="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="DropDownOpenBorder"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Visibility="Collapsed"/>
            <Border x:Name="FocusBorder"
                    Visibility="Collapsed"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=MarkerBrush}"
                    Opacity="0.2"/>
            <TextBlock x:Name="Watermark"
                    Text="{TemplateBinding EmptyText}"
                    IsHitTestVisible="False"
                    Padding="{TemplateBinding Padding}"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Left"
                    Visibility="Collapsed"
                    Margin="5 0 0 0"
                    Opacity="0.5"/>
            <Popup x:Name="PART_Popup" Margin="0 1" VerticalOffset="1">
                <Grid x:Name="PopupRoot">
                    <Border
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            x:Name="PART_ResizeBorder"
                            Background="{telerik:Windows8Resource ResourceKey=MainBrush}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <telerik:RadButton x:Name="PART_ClearButton"
                                    Grid.Row="0"
                                    Margin="-1 -1 -1 0"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    Visibility="{TemplateBinding ClearSelectionButtonVisibility}"
                                    Content="{TemplateBinding ClearSelectionButtonContent}"/>
                            <ScrollViewer x:Name="PART_ScrollViewer"
                                    Grid.Row="1"
                                    BorderThickness="0"
                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                    Foreground="{TemplateBinding Foreground}"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
                                    Padding="0 1 0 0">
                                <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="Normal"/>
                    <VisualState x:Name="MouseOver"/>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="BackgroundBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledBorder" Storyboard.TargetProperty="Opacity" To="0.5"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownOpen">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="FocusBorder" Storyboard.TargetProperty="Opacity" To="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusBorder">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="BackgroundBorder" IsHitTestVisible="False" Background="{TemplateBinding Background}"/>
            <Border x:Name="DisabledBorder" IsHitTestVisible="False" Opacity="0" Background="{TemplateBinding Background}"/>
            <telerik:RadToggleButton x:Name="PART_DropDownButton"
                    IsTabStop="False"
                    Padding="{TemplateBinding Padding}"
                    Content="{TemplateBinding SelectionBoxItem}"
                    ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Style="{StaticResource NonEditableComboToggleButtonStyle}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{x:Null}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontSize="{TemplateBinding FontSize}"
                    ClickMode="Press"
                    Foreground="{TemplateBinding Foreground}"/>
            <Border x:Name="FocusBorder"
                    IsHitTestVisible="False"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Visibility="Collapsed"
                    Background="Transparent"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    Opacity="0.2"/>
            <Popup x:Name="PART_Popup" Margin="0 1" VerticalOffset="1">
                <Grid x:Name="PopupRoot">
                    <Border
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            x:Name="PART_ResizeBorder"
                            Background="{telerik:Windows8Resource ResourceKey=MainBrush}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <telerik:RadButton x:Name="PART_ClearButton"
                                    Grid.Row="0"
                                    Margin="-1 -1 -1 0"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    Visibility="{TemplateBinding ClearSelectionButtonVisibility}"
                                    Content="{TemplateBinding ClearSelectionButtonContent}"/>
                            <ScrollViewer x:Name="PART_ScrollViewer"
                                    Grid.Row="1"
                                    BorderThickness="0"
                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    Foreground="{TemplateBinding Foreground}"
                                    CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
                                    Padding="0 1 0 0">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadComboBoxItemStyle" TargetType="telerikInput:RadComboBoxItem">
        <Setter Property="Padding" Value="3 2"/>
        <Setter Property="MinHeight" Value="24"/>
        <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="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikInput:RadComboBoxItem">
                    <Border x:Name="BorderVisual" 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>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.33"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Border x:Name="HighlightVisual"
                                    Visibility="Collapsed"
                                    Margin="0 -1 0 0"
                                    AutomationProperties.AutomationId="HighlightVisual"
                                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                    Opacity="0.15"/>
                            <Border x:Name="SelectedVisual"
                                    Opacity="0"
                                    Background="{telerik1:Windows8Resource ResourceKey=BasicBrush}"
                                    BorderBrush="{telerik1:Windows8Resource ResourceKey=BasicBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Margin="0 -1 0 0"
                                    SnapsToDevicePixels="True"/>
                            <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="HighlightVisual" Property="Opacity" Value="0"/>
                                <Setter TargetName="SelectedVisual" Property="Opacity" Value="1"/>
                            </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="5 0"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamilyStrong}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <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}"/>
    <SolidColorBrush x:Key="WindowBorderBackground" Color="#FFCCE4FC"/>
    <SolidColorBrush x:Key="WindowModalBackground" Color="#333333FF"/>
    <Thickness x:Key="WindowButtonPadding">4 1</Thickness>
    <Thickness x:Key="WindowButtonMargin">1 3 0 2</Thickness>

    <!-- RadWindow Styles -->
    <DataTemplate x:Key="AlertIconTemplate">
        <Path
                Height="32"
                Stretch="Fill"
                Width="8"
                Data="F1M242.9,305.3L242.4,318.8L238.9,318.8L238.4,305.3z M243.1,322.9C243.1,323.6,242.9,324.1,242.5,324.5C242,325,241.4,325.2,240.7,325.2C239.9,325.2,239.3,325,238.8,324.5C238.4,324.1,238.1,323.5,238.1,322.9C238.1,322.3,238.4,321.7,238.9,321.3C239.3,320.9,239.9,320.7,240.7,320.7C241.4,320.7,242,320.9,242.4,321.3C242.9,321.7,243.1,322.3,243.1,322.9"
                Fill="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
    </DataTemplate>
    <DataTemplate x:Key="ConfirmIconTemplate">
        <Path
                Stretch="Fill"
                Width="22"
                Height="32"
                Data="M7.7,17.9 C9.1,17.9 10.2,19 10.2,20.4 C10.2,21.7 9.1,22.8 7.7,22.8 C6.4,22.8 5.3,21.7 5.3,20.4 C5.3,19 6.4,17.9 7.7,17.9 z M7.6,0 C9,0 10.3,0.2 11.3,0.6 C12.3,1 13,1.5 13.7,2.1 C14.3,2.7 14.7,3.3 14.9,4 C15.2,4.7 15.3,5.4 15.3,6 C15.3,7 15.2,7.8 14.9,8.4 C14.7,9.1 14.4,9.6 14,10.1 C13.6,10.6 13.2,11 12.7,11.3 C12.2,11.6 11.8,11.9 11.4,12.2 C11,12.6 10.6,12.9 10.3,13.4 C9.9,13.8 9.7,14.3 9.6,14.9 L9.6,16.1 L5.4,16.1 L5.4,14.7 C5.5,13.8 5.7,13.1 5.9,12.5 C6.2,11.8 6.5,11.3 6.9,10.9 C7.3,10.5 7.7,10.1 8.1,9.8 C8.5,9.5 8.9,9.2 9.3,8.9 C9.6,8.5 9.9,8.2 10.1,7.8 C10.4,7.5 10.5,7 10.4,6.4 C10.4,5.5 10.2,4.8 9.7,4.3 C9.3,3.8 8.6,3.6 7.8,3.6 C7.2,3.6 6.7,3.7 6.3,3.9 C5.9,4.2 5.6,4.4 5.3,4.8 C5.1,5.2 4.9,5.6 4.7,6.1 C4.6,6.6 4.5,7.1 4.5,7.7 L0,7.7 C0,6.5 0.2,5.5 0.5,4.6 C0.9,3.6 1.4,2.8 2.1,2.1 C2.7,1.4 3.5,0.9 4.4,0.5 C5.4,0.1 6.4,0 7.6,0 z"
                Fill="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
    </DataTemplate>
    <Style x:Key="WindowButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Padding" Value="{StaticResource WindowButtonPadding}"/>
        <Setter Property="Margin" Value="{StaticResource WindowButtonMargin}"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Bottom"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.7"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle Fill="Transparent" x:Name="Rectangle"/>
                        <ContentPresenter x:Name="Content" 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="ContentOuterBorder" Storyboard.TargetProperty="Margin">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Thickness>0</Thickness>
                                    </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="HeaderButtons" 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="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="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="WindowOuterBorder" Grid.RowSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}">
                <AdornerDecorator>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" MinHeight="30"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid x:Name="Header" Background="{telerik:Windows8Resource ResourceKey=AccentBrush}">
                            <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"
                                        Content="{TemplateBinding Icon}"
                                        ContentTemplate="{TemplateBinding IconTemplate}"
                                        Margin="2"/>
                                <ContentControl x:Name="HeaderContent"
                                        Grid.Column="1"
                                        IsTabStop="False"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Center"
                                        HorizontalContentAlignment="Stretch"
                                        Content="{TemplateBinding Header}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        SnapsToDevicePixels="True"
                                        ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                        FontSize="{telerik:Windows8Resource ResourceKey=FontSizeL}"
                                        FontFamily="{telerik:Windows8Resource ResourceKey=FontFamilyLight}"
                                        Foreground="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </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 Data="M0,0 L10,0 L10,2 L0,2 z" Height="2" Width="10" VerticalAlignment="Bottom" Margin="0 0 0 6" Fill="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                                    </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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                                                Width="10"
                                                Height="10"
                                                Data="M0,2.0009768 L8,2.0009768 L8,10.000977 L0,10.000977 z M1.0026064,0 L10.000999,0.015881581 L10.000999,9.0009928 L9.0009499,9.0010004 L9.0006638,1.0009757 L0.98699945,0.99989343 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 Data="M1,1 L9,1 L9,9 L1,9 z" Stroke="{telerik:Windows8Resource ResourceKey=MainBrush}" StrokeThickness="2" Width="10" Height="10"/>
                                    </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 Data="M1,1 L9,9 M1.0000687,9.0000982 L9.0000687,1.0000986" Stroke="{telerik:Windows8Resource ResourceKey=MainBrush}" StrokeThickness="2" Width="10" Height="10"/>
                                    </telerik:RadButton>
                                </StackPanel>
                            </Border>
                        </Grid>
                        <Border x:Name="ContentOuterBorder" Grid.Row="1" Margin="{TemplateBinding BorderThickness}">
                            <ContentPresenter x:Name="ContentElement" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </Border>
                    </Grid>
                </AdornerDecorator>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadWindowStyle" TargetType="telerikNavigation:RadWindow">
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="2 0 2 2"/>
        <Setter Property="MinHeight" Value="32"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="BorderBackground" Value="{StaticResource WindowBorderBackground}"/>
        <Setter Property="MinWidth" Value="100"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <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="Template" Value="{StaticResource RadWindowTemplate}"/>
        <Setter Property="CaptionHeight" Value="28"/>
        <Setter Property="ResizeBorder" Value="5"/>
        <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="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="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <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="Center" Margin="16 0 8 0" 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" BorderBrush="{x:Null}">
                                <ContentPresenter x:Name="PromptText" Margin="8 8 8 0"/>
                            </ScrollViewer>
                            <TextBox IsTabStop="True" TabIndex="0" x:Name="PromptTextBox" Margin="8 0 8 8" Focusable="True"/>
                        </StackPanel>
                        <Border x:Name="HorizontalRule" Grid.Row="1" Grid.ColumnSpan="2" Height="1" VerticalAlignment="Top" Background="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                        <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="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadConfirm">
                    <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>
                        <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" BorderBrush="{x:Null}">
                            <ContentPresenter x:Name="ConfirmText" Margin="8 8 8 0"/>
                        </ScrollViewer>
                        <Border x:Name="HorizontalRule" Grid.Row="1" Grid.ColumnSpan="2" Height="1" VerticalAlignment="Top" Background="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                        <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"
                                    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"
                                    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="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <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 7" BorderBrush="{x:Null}">
                            <ContentPresenter x:Name="AlertText" Margin="8 8 8 0"/>
                        </ScrollViewer>
                        <Border x:Name="HorizontalRule" Grid.Row="1" Grid.ColumnSpan="2" Height="1" VerticalAlignment="Top" Background="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                        <telerik:RadButton x:Name="OK"
                                Command="{x:Static telerik:WindowCommands.Confirm}"
                                telerikNavigation:RadWindow.ResponseButton="Accept"
                                Grid.Row="1"
                                Grid.ColumnSpan="2"
                                MinWidth="70"
                                HorizontalAlignment="Right"
                                telerik:LocalizationManager.ResourceKey="Ok"
                                Margin="0 10 8 8"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikNavigation:RadAlert" BasedOn="{StaticResource RadAlertStyle}"/>
    <Thickness x:Key="RibbonGalleryHeaderBorderThickness">0 0 0 0</Thickness>
    <SolidColorBrush x:Key="RibbonGroupButtonBackgroundBrush" Color="Transparent"/>
    <SolidColorBrush x:Key="ContextualGroup_OpacityMask" Color="#4C000000"/>
    <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="0.15" 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"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </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="0.15" 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 x:Name="ButtonBackgroundPressed"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
            <Border x:Name="ButtonBackgroundHover"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
            <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="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <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="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ChromeMouseOver" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Chrome" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Chrome"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Chrome">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
                                        </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>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Path" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                                        </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="ChromeMouseOver"
                                Grid.ColumnSpan="2"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                        <Border x:Name="ChromeCheck" Grid.ColumnSpan="2" Visibility="Collapsed" Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
                        <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="Border" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Opacity" To="0.5"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledBorder" Storyboard.TargetProperty="Opacity" To="0.5"/>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PART_EditableTextBox" Storyboard.TargetProperty="Opacity" To="0.6"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownOpen"/>
                </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="0.15" 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="Border"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="DisabledBorder" Grid.ColumnSpan="2" Opacity="0" IsHitTestVisible="False" Background="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
            <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="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <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="{telerik:Windows8Resource ResourceKey=MainBrush}">
                        <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>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Opacity" To="0.5"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="DropDownOpen"/>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.15" 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="Border" IsHitTestVisible="False" Background="{TemplateBinding Background}"/>
            <Border x:Name="KeyboardNavigationVisual" Opacity="0" Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <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="{telerik:Windows8Resource ResourceKey=MainBrush}">
                        <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.Triggers>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter TargetName="ContentPresenterElement" Property="TextElement.Foreground" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadRibbonComboBoxStyle" TargetType="telerikRibbonView:RadRibbonComboBox">
        <Setter Property="Template" Value="{StaticResource EditableRibbonComboBox}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="3 4"/>
        <Setter Property="MinHeight" Value="22"/>
        <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>
                            <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HighlightVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.5"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
                <Border x:Name="HighlightVisual" Visibility="Collapsed" Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                <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="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Padding" Value="3 2"/>
        <Setter Property="MinHeight" Value="24"/>
        <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="0.15" 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"/>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </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="0.15" 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 x:Name="PressedVisual"
                    Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"/>
            <Border x:Name="CheckedVisual"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="MouseOverVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
            <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 -4 0 0">
                    <TextBlock Name="textRow2" Text="{TemplateBinding TextRow2}" Foreground="{TemplateBinding Foreground}"/>
                    <Path
                            Name="DropDownIndicator"
                            IsHitTestVisible="False"
                            VerticalAlignment="Center"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Fill="{telerik:Windows8Resource ResourceKey=MarkerBrush}"
                            Width="5"
                            Height="3"
                            Margin="3 6"
                            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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                            BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}">
                        <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="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="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <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="0.15" 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"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.15" 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 x:Name="PressedVisual"
                    Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"/>
            <Border x:Name="CheckedVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
            <Border x:Name="MouseOverVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
            <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="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="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <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>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backgroundDecorator" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="backgroundDecorator" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backgroundDecorator" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </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>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPart" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </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="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="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
                            </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="0.15" 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}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
            <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="0"/>
                <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"
                        IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                <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="{telerik:Windows8Resource ResourceKey=MarkerBrush}"
                                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="3 6"/>
                    </Grid>
                </StackPanel>
            </Grid>
            <Border x:Name="checkedDecorator" Opacity="0" BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                            BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                            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="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <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="0.15" 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>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </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="0.15" 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 x:Name="PressedVisual"
                    Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"/>
            <Border x:Name="CheckedVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
            <Border x:Name="MouseOverVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Opacity="0"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
            <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="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinHeight" Value="22"/>
        <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" To="0.1" Storyboard.TargetName="BackgroundBorder" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetName="BackgroundBorder" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.3" 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="0.75" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="BackgroundBorder" Background="{telerik:Windows8Resource ResourceKey=StrongBrush}" Opacity="0"/>
            <Border x:Name="isOpenIndicator"
                    Opacity="0"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="KeyboardNavigationVisual" Opacity="0" Background="{x:Null}" BorderBrush="{telerik:Windows8Resource ResourceKey=MainBrush}" BorderThickness="1" Margin="1"/>
            <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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </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="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                    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="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                    Margin="1"/>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                    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}">
                <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="{telerik:Windows8Resource ResourceKey=MainBrush}">
                        <Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}" Data="M3,0 L6,4 L0,4z"/>
                    </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="{telerik:Windows8Resource ResourceKey=MainBrush}">
                        <Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}" Data="M0,0 L6,0 L3,4z"/>
                    </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="{telerik:Windows8Resource ResourceKey=MainBrush}">
                        <Path
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Stretch="None"
                                Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                Data="M0,2 L6,2 L3,6z M0,0 L6,0 L6,1 L0,1 z"/>
                    </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 1 0 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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="257"/>
        <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="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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}"/>
                        <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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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 Grid.RowSpan="2" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/>
            <Grid x:Name="Tray" Grid.Row="1" Margin="1 0 2 2">
                <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="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                <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="{telerik:Windows8Resource ResourceKey=StrongBrush}" 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"/>
                        </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="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="Padding" Value="3 3 5 3"/>
        <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="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Padding" Value="11 4 5 4"/>
        <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="0.15"/>
                        </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>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow2" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Opened"/>
                </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="0.15"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="NormalVisual" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"/>
            <Border x:Name="MouseOverVisual" Opacity="0" Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <Border x:Name="PressedVisual" Opacity="0" Background="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
            <Border x:Name="KeyboardNavigationVisual" Opacity="0" Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
            <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"
                        TextBlock.Foreground="{TemplateBinding Foreground}"/>
                <Border x:Name="Image" Margin="3" Background="{StaticResource RibbonGroupButtonBackgroundBrush}" Width="31" Height="31">
                    <Grid>
                        <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" Margin="0 5 0 0">
                    <TextBlock Name="textRow2" Text="{TemplateBinding TextRow2}" Foreground="{TemplateBinding Foreground}"/>
                    <Path
                            Name="DropDownIndicator"
                            IsHitTestVisible="False"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Margin="2"
                            VerticalAlignment="Top"
                            HorizontalAlignment="Center"
                            Fill="{telerik:Windows8Resource ResourceKey=MarkerBrush}"
                            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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                            BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                            BorderThickness="1">
                        <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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="SeparatorStyle" TargetType="telerikRibbonView:Separator">
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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}"
                    Margin="0 0 -1 0">
                <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="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </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}"/>
            <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}"
                        Grid.ColumnSpan="2"/>
                <Image x:Name="Image"/>
                <TextBlock x:Name="textRow1" Grid.Column="1" Text="{TemplateBinding Text}" TextAlignment="Left" VerticalAlignment="Center" Margin="4 0 1 0"/>
            </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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </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>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </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}"/>
            <Border x:Name="isOpenIndicator" Visibility="Collapsed" Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
            <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}"
                        Foreground="{TemplateBinding Foreground}"/>
                <Image x:Name="Image"/>
                <TextBlock x:Name="textRow1" Grid.Column="1" Text="{TemplateBinding Text}" TextAlignment="Left" VerticalAlignment="Center" Margin="4 0 1 0"/>
                <Grid x:Name="DropDownPanel" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2 0 0 0">
                    <Path x:Name="DropDownIndicator"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                            Data="M 0,0 L 3.5,3.5 L 0,7"/>
                </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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                            BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                            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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownPart" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </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="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIndicator" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textRow1" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </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}"/>
            <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}"
                        BorderThickness="0"/>
                <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}}"/>
                <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="0 0 2 0"/>
                <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="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                            Data="M 0,0 L 3.5,3.5 L 0,7"/>
                </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"
                            MinWidth="3"
                            MinHeight="3"
                            Width="{TemplateBinding DropDownWidth}"
                            Height="{TemplateBinding DropDownHeight}"
                            Background="{telerik:Windows8Resource ResourceKey=MainBrush}"
                            BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                            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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=AccentBrush}" MinHeight="24"/>
                    <Rectangle x:Name="buttonRectangle" HorizontalAlignment="Left" Fill="Transparent" MinHeight="24" Width="44"/>
                    <Border Grid.Row="1" Background="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                    <Border BorderThickness="0 1 0 0" BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}" 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="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="100"/>
                        </Border>
                    </Grid>
                    <Border Grid.Row="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1 1 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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="BorderThickness" Value="0 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}"/>
            <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="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <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>
                            <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterBorderHover"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <Border x:Name="OuterBorderHover" Opacity="0" Background="{telerik:Windows8Resource ResourceKey=StrongBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <Path x:Name="Path"
                    Style="{StaticResource RibbonScrollViewerPathStyle}"
                    Fill="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </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"/>
                        </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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                            </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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </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"/>
            <Grid x:Name="SelectedVisualState" Visibility="Collapsed">
                <Rectangle Fill="{telerik:Windows8Resource ResourceKey=AccentBrush}" Stroke="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
            </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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                    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="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="HeaderForeground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <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}"
                BorderThickness="1"
                Background="{TemplateBinding Background}"
                Margin="0 1 1 0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <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="{telerik:Windows8Resource ResourceKey=BasicBrush}" Width="1" 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}">
                    <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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                    </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="HeaderBackground" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <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>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderElement" Storyboard.TargetProperty="Foreground">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                        BorderThickness="1"/>
                <Border x:Name="Background_Selected"
                        BorderThickness="1 1 1 0"
                        Visibility="Collapsed"
                        Background="{telerik:Windows8Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                <Border x:Name="KeyboardNavigationVisual"
                        BorderThickness="1 1 1 0"
                        Opacity="0"
                        Background="{telerik:Windows8Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}">
                    <Border Background="{telerik:Windows8Resource ResourceKey=AccentBrush}" Opacity="0.25"/>
                </Border>
                <ContentControl x:Name="HeaderElement"
                        Content="{TemplateBinding Header}"
                        IsTabStop="False"
                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                        Foreground="{TemplateBinding Foreground}"
                        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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                <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="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="11 4 12 4"/>
        <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="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="BackgroundBorder" 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="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="BackgroundBorder" 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/>
                    </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}" OpacityMask="{StaticResource ContextualGroup_OpacityMask}"/>
                <Border x:Name="BackgroundBorder"
                        Background="{TemplateBinding Background}"
                        OpacityMask="#00000000"
                        Margin="0 0 3 0"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"/>
                <Border x:Name="Background_Over"
                        Visibility="Collapsed"
                        Margin="0 0 3 0"
                        Background="{telerik:Windows8Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                        BorderThickness="1"/>
                <Border x:Name="Background_Selected"
                        Visibility="Collapsed"
                        Margin="0 0 3 0"
                        Background="{telerik:Windows8Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                        BorderThickness="1 1 1 0"/>
                <Border x:Name="KeyboardNavigationVisual"
                        BorderThickness="1 1 1 0"
                        Margin="0 0 3 0"
                        Opacity="0"
                        Background="{telerik:Windows8Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}">
                    <Border Background="{telerik:Windows8Resource ResourceKey=AccentBrush}" Opacity="0.25"/>
                </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>
                <ContentControl x:Name="HeaderElement"
                        Content="{TemplateBinding Header}"
                        IsTabStop="False"
                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                        Foreground="{TemplateBinding Foreground}"
                        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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}">
                    <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="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="11 4 12 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 Color}"/>
            <Border Background="{TemplateBinding Color}" OpacityMask="{StaticResource ContextualGroup_OpacityMask}"/>
            <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="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="0 2 0 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}" BorderBrush="{TemplateBinding BorderBrush}"/>
            </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
                            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="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"/>
                </Grid>
            </telerikRibbonView:RadRibbonDropDownButton>
        </Grid>
    </ControlTemplate>
    <Style x:Key="QuickAccessToolBarStyle" TargetType="telerikRibbonView:QuickAccessToolBar">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <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"
                                FontSize="{telerik:Windows8Resource ResourceKey=FontSizeS}"/>
                        <TextBlock x:Name="Divider"
                                Text="{telerik:LocalizableResource Key=RibbonViewWindowTitleDivider}"
                                Visibility="{TemplateBinding DividerVisibility}"
                                Foreground="{TemplateBinding Foreground}"
                                FontSize="{telerik:Windows8Resource ResourceKey=FontSizeS}"/>
                        <TextBlock x:Name="ApplicationName"
                                Text="{TemplateBinding ApplicationName}"
                                Foreground="{TemplateBinding Foreground}"
                                TextTrimming="CharacterEllipsis"
                                FontSize="{telerik:Windows8Resource ResourceKey=FontSizeS}"/>
                    </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="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
                            </c:Case>
                            <c:Default>
                                <Setter TargetName="WindowTitle" Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                            </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>
                            <DoubleAnimation Storyboard.TargetName="arrow" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <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="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="0.15" 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}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
            <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="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                    StrokeThickness="0"
                    Width="12"
                    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}"/>
            <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="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="TitleBarBackground" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <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/"/>
    <CornerRadius x:Key="ControlOuterBorder_CornerRadius">0</CornerRadius>
    <CornerRadius x:Key="ImageMiniToolBar_CornerRadius">0</CornerRadius>
    <CornerRadius x:Key="ImageMiniToolBar_FooterCornerRadius">0</CornerRadius>
    <Thickness x:Key="MultipleUndoControl_ButtonMargin">-1 1 -1 -1</Thickness>
    <Style x:Key="TextElementPropertiesExplicitStyle" TargetType="Control">
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
    </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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="ImageMiniToolbarCloseButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="MiniToolBarPath">
                                            <DiscreteObjectKeyFrame>
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush>Transparent</SolidColorBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="MiniToolBarPath">
                                            <DiscreteObjectKeyFrame Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Stretch="None"
                                x:Name="MiniToolBarPath"
                                Opacity="0.8"
                                SnapsToDevicePixels="True"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ImageMiniToolBarStyle" TargetType="telerikControlsRTBUI:ImageMiniToolBar" BasedOn="{StaticResource MiniToolbarBaseStyle}">
        <Setter Property="MinWidth" Value="40"/>
        <Setter Property="MinHeight" Value="238"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUI:ImageMiniToolBar">
                    <Border
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{StaticResource ImageMiniToolBar_CornerRadius}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" MinHeight="32"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Border Background="{telerik:Windows8Resource ResourceKey=AccentBrush}" Margin="-1"/>
                            <StackPanel Margin="2" Orientation="Vertical">
                                <telerik:RadButton
                                        HorizontalAlignment="Right"
                                        Padding="0"
                                        Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CloseCommand}"
                                        Style="{StaticResource ImageMiniToolbarCloseButtonStyle}"
                                        Width="10"
                                        Height="10"
                                        IsBackgroundVisible="False">
                                    <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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Stretch="None"
                                            Opacity="0.8"
                                            SnapsToDevicePixels="True"/>
                                </telerik:RadButton>
                                <TextBlock
                                        telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_Header"
                                        Foreground="{telerik:Windows8Resource ResourceKey=MainBrush}"
                                        HorizontalAlignment="Center"
                                        Margin="2"/>
                                <Grid HorizontalAlignment="Center" Margin="0 2">
                                    <StackPanel Orientation="Horizontal">
                                        <Rectangle Width="1" Height="1" Fill="{telerik:Windows8Resource ResourceKey=MainBrush}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                        <Rectangle Width="1" Height="1" Fill="{telerik:Windows8Resource ResourceKey=MainBrush}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                        <Rectangle Width="1" Height="1" Fill="{telerik:Windows8Resource ResourceKey=MainBrush}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                        <Rectangle Width="1" Height="1" Fill="{telerik:Windows8Resource ResourceKey=MainBrush}" Margin="0 0 1 0" UseLayoutRounding="True" SnapsToDevicePixels="True"/>
                                    </StackPanel>
                                </Grid>
                            </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="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                                    CornerRadius="{StaticResource ImageMiniToolBar_FooterCornerRadius}"
                                    Margin="0"/>
                        </Grid>
                    </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="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
    </Style>
    <Style x:Key="DialogLabelStyle" TargetType="telerikDialogs:DialogLabel" BasedOn="{StaticResource RadRichTextBoxLabelBaseStyle}">
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <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="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamilyStrong}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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="37"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikDialogs:DialogFooter">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderBrush="{telerik:Windows8Resource ResourceKey=MainBrush}" 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="{telerik:Windows8Resource ResourceKey=MainBrush}" 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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Stroke" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="StrokeThickness" Value="1"/>
    </Style>
    <Style x:Key="PageMarginStyle" TargetType="Rectangle">
        <Setter Property="Fill" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Stroke" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <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 -3 0 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="Indent" 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="LeftIndent" 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="FirstLineIndent" 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="Indent"
                    Stretch="Fill"
                    Visibility="Collapsed"
                    UseLayoutRounding="True"
                    RenderTransformOrigin="0.5 0.5"
                    Fill="{TemplateBinding Background}"
                    Height="8"
                    Width="9"
                    Stroke="{TemplateBinding Foreground}"
                    Data="M0 4 L4.5 0 9 4 9 8 L0 8 z"/>
            <Path x:Name="FirstLineIndent"
                    Stretch="Fill"
                    RenderTransformOrigin="0.5 0.5"
                    Visibility="Collapsed"
                    UseLayoutRounding="True"
                    Fill="{TemplateBinding Background}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Height="8"
                    Width="9"
                    Stroke="{TemplateBinding Foreground}"
                    Data="M0,0 9,0 9,4 4.5,8 0,4z"/>
            <Rectangle x:Name="LeftIndent"
                    Fill="{TemplateBinding Background}"
                    Visibility="Collapsed"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Height="5"
                    Width="9"
                    Stroke="{TemplateBinding Foreground}"/>
            <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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                        <Border
                                Height="1"
                                Margin="0 1 0 0"
                                VerticalAlignment="Top"
                                Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 3 0 0"
                                VerticalAlignment="Top"
                                Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 5 0 0"
                                VerticalAlignment="Top"
                                Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 7 0 0"
                                VerticalAlignment="Top"
                                Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="1 0 0 0"
                                Width="1"
                                Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                UseLayoutRounding="False"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="3 0 0 0"
                                Width="1"
                                Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="5 0 0 0"
                                Width="1"
                                Background="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                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="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=BasicBrush}" 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="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <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="{telerik:Windows8Resource ResourceKey=MainBrush}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch">
                            <Grid x:Name="PART_HorizontalRulerContainer" Height="19" Margin="0 5">
                                <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="{telerik:Windows8Resource ResourceKey=MainBrush}" Canvas.Left="0" Canvas.Top="0" Height="14"/>
                                    <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="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_FirstLineIndentMarker" RulerThumbType="FirstLineIndent" Canvas.ZIndex="0" Style="{StaticResource FirstLineIndentThumbStyle}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_IndentMarker" RulerThumbType="Indent" Canvas.ZIndex="0" Style="{StaticResource HangingIndentThumbStyle}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_LeftIndentMarker" RulerThumbType="LeftIndent" Canvas.ZIndex="0" Style="{StaticResource LeftIndentThumbStyle}"/>
                                </Canvas>
                                <Canvas x:Name="PART_TabStopMarkersContainer" Grid.Row="1" Height="5"/>
                            </Grid>
                        </Canvas>
                        <Canvas x:Name="PART_VerticalCanvas" Grid.Row="1" Background="{telerik:Windows8Resource ResourceKey=MainBrush}" 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="{telerik:Windows8Resource ResourceKey=MainBrush}" Canvas.Left="0" Canvas.Top="0" Width="14"/>
                                    <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 x:Name="PART_TabStops"
                                Background="{telerik:Windows8Resource ResourceKey=MainBrush}"
                                BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                                BorderThickness="1"
                                Width="14"
                                Height="14">
                            <telerikControlsRTBUI:RulerThumb x:Name="PART_RulerThumbTypeSelector" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0" IsHitTestVisible="False"/>
                        </Border>
                        <Line x:Name="PART_MarkLine"
                                Grid.Row="1"
                                Grid.Column="1"
                                Stroke="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                StrokeThickness="1"
                                StrokeDashArray="1 1 1 1 1 3"
                                Margin="0 2 0 0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="StatusBarRadButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Width" Value="16"/>
        <Setter Property="Margin" Value="2 5"/>
        <Setter Property="Height" Value="16"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="IsBackgroundVisible" Value="False"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="0:0:0" Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00.050" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStatesGroup">
                                <VisualState x:Name="Unfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.150" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.115" Value="0.2"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundHidden">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundVisible"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{TemplateBinding Background}"/>
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                RecognizesAccessKey="True"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
                        <Border x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    Visibility="Collapsed"
                                    Opacity="0"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    BorderThickness="0"
                                    BorderBrush="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="LayoutModeButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Grid SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CommonStatesWrapper" Storyboard.TargetProperty="Opacity">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00.050" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="DisabledChecked">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="DisabledCheckedVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverChecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStatesGroup">
                                <VisualState x:Name="Unfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.150">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.150" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.115" Value="0.2"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BackgroundVisibility">
                                <VisualState x:Name="BackgroundHidden">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity">
                                            <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BackgroundVisible"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="CommonStatesWrapper">
                            <Border x:Name="FocusVisual"
                                    Visibility="Collapsed"
                                    Opacity="0"
                                    BorderThickness="1"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    BorderBrush="{telerik:Windows8Resource ResourceKey=MarkerBrush}"/>
                        </Border>
                        <Border x:Name="CheckedVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                                Background="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
                        <Border x:Name="DisabledCheckedVisual"
                                Opacity="0.5"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderBrush="{telerik:Windows8Resource ResourceKey=AccentBrush}"
                                Background="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
                        <ContentControl x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                Content="{TemplateBinding Content}"
                                Foreground="{TemplateBinding Foreground}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}">
                            <ContentControl.RenderTransform>
                                <TranslateTransform/>
                            </ContentControl.RenderTransform>
                        </ContentControl>
                    </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"
                                Style="{StaticResource LayoutModeButtonStyle}"
                                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"
                                Style="{StaticResource LayoutModeButtonStyle}"
                                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="1"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Border
                            Background="{TemplateBinding Background}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Height="{TemplateBinding Height}"
                            Margin="0 -1 0 0"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ThumbPredefinedStyle" TargetType="Thumb">
        <Setter Property="Width" Value="4"/>
        <Setter Property="Height" Value="12"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <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 Duration="0:0:0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled"/>
                            </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"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Margin="1 0"/>
                        <Border x:Name="FocusVisual" Opacity="0.2" BorderBrush="{telerik:Windows8Resource ResourceKey=MarkerBrush}" Visibility="Collapsed" BorderThickness="1" Margin="1 0"/>
                    </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}"
                                Background="{telerik:Windows8Resource ResourceKey=MainBrush}"
                                VerticalAlignment="Center"/>
                    </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" Margin="0 3">
                            <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" Style="{StaticResource StatusBarRadButtonStyle}">
                            <Path Data="M461.1,217.7 L469.3,217.7" Stretch="Fill" Stroke="{telerik:Windows8Resource ResourceKey=MainBrush}" 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" Style="{StaticResource StatusBarRadButtonStyle}">
                            <Grid>
                                <Path Data="M374,105 L374,167.5" Stretch="Fill" StrokeThickness="2" Stroke="{telerik:Windows8Resource ResourceKey=MainBrush}" Width="2" Height="10"/>
                                <Path Data="M461.1,217.7 L469.3,217.7" Stretch="Fill" Stroke="{telerik:Windows8Resource ResourceKey=MainBrush}" 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="{telerik:Windows8Resource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}"/>
        <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <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="Foreground" Value="{telerik:Windows8Resource ResourceKey=StrongBrush}"/>
        <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <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}"/>
                        <Border x:Name="CheckedBorder"
                                Background="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                                BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
                                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>
