<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:shell="clr-namespace:Telerik.Windows.Controls.RibbonView.Shell;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:Office2016ResourceDictionary/>
    </ResourceDictionary.MergedDictionaries>
    <telerik1:ColorToBrushConverter x:Key="converter"/>
    <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <Geometry x:Key="ArrowTopRight8x8">M0,0 L8,0 8,8 z</Geometry>
    <Geometry x:Key="IndentIcon">M0 4 L4.5 0 9 4 9 8 L0 8 z</Geometry>
    <Geometry x:Key="FirstLineIndentIcon">M0,0 9,0 9,4 4.5,8 0,4z</Geometry>
    <Geometry x:Key="LeftTabIcon">M0 0 L2 0 L2 3 L5 3 L5 5 L2 5 L0 5 L0 3 z</Geometry>
    <Geometry x:Key="CenterTabIcon">M3.4 0 L5.4 0 L5.4 3 L9 3 L9 5 L0 5 L0 3 L3.4 3 z</Geometry>
    <Geometry x:Key="DecimalTabIcon">M3 0 L4.8 0 L4.8 3 L8 3 L8 5 L0 5 L0 3 L3 3 z M6.2 0 L8 0 L8 1.7 L6.2 1.7 z</Geometry>
    <Geometry x:Key="BarTabIcon">M0 0 L2 0 L2 5 L0 5 z</Geometry>
    <FontFamily x:Key="TelerikWebUI">/Telerik.Windows.Controls;component/Themes/Fonts/TelerikWebUI.ttf#TelerikWebUI</FontFamily>
    <sys:String x:Key="GlyphArrow60Up"></sys:String>
    <sys:String x:Key="GlyphArrow60Right"></sys:String>
    <sys:String x:Key="GlyphArrow60Down"></sys:String>
    <sys:String x:Key="GlyphArrow60Left"></sys:String>
    <sys:String x:Key="GlyphArrowOverflowDown"></sys:String>
    <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
    <sys:String x:Key="GlyphArrowChevronLeft"></sys:String>
    <sys:String x:Key="GlyphClose"></sys:String>
    <sys:String x:Key="GlyphPlus"></sys:String>
    <sys:String x:Key="GlyphMinus"></sys:String>
    <sys:String x:Key="GlyphLaunch"></sys:String>
    <sys:String x:Key="GlyphWindow"></sys:String>
    <sys:String x:Key="GlyphWindowCollapse"></sys:String>
    <sys:String x:Key="GlyphMinimize"></sys:String>
    <sys:String x:Key="GlyphQuestion"></sys:String>
    <sys:String x:Key="GlyphWarning"></sys:String>
    <sys:String x:Key="GlyphImageResize"></sys:String>
    <sys:String x:Key="GlyphCrop"></sys:String>
    <sys:String x:Key="GlyphFlipHorizontal"></sys:String>
    <sys:String x:Key="GlyphFlipVertical"></sys:String>
    <sys:String x:Key="GlyphRotate"></sys:String>
    <sys:String x:Key="GlyphBlur"></sys:String>
    <sys:String x:Key="GlyphSharpen"></sys:String>
    <sys:String x:Key="GlyphForegroundColor"></sys:String>
    <sys:String x:Key="GlyphAlignLeft"></sys:String>
    <sys:String x:Key="GlyphGlobe"></sys:String>
    <sys:String x:Key="GlyphUnpin"></sys:String>
    <ControlTemplate x:Key="ErrorTooltipTemplate" TargetType="ToolTip">
        <Grid x:Name="RootVisual" HorizontalAlignment="Right" RenderTransformOrigin="0 0" Opacity="0" SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition To="Open" GeneratedDuration="0:0:0.3">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.3">
                                    <DoubleAnimation.EasingFunction>
                                        <BackEase Amplitude=".4" EasingMode="EaseOut"/>
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.3"/>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0"/>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Border Background="{telerik1:Office2016Resource ResourceKey=ValidationBrush}" Padding="1" Margin="5 0">
                <ContentPresenter Content="{Binding ErrorContent}" TextBlock.Foreground="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}" Margin="4"/>
            </Border>
            <ContentControl/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ValidationTooltipTemplate">
        <Grid SnapsToDevicePixels="True" VerticalAlignment="Top">
            <Border Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Width="3" Height="3"/>
            <AdornedElementPlaceholder x:Name="Holder"/>
            <Border BorderBrush="{telerik1:Office2016Resource ResourceKey=ValidationBrush}" BorderThickness="1" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <Path
                    Data="{StaticResource ArrowTopRight8x8}"
                    Fill="{telerik1:Office2016Resource ResourceKey=ValidationBrush}"
                    Width="8"
                    Height="8"
                    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:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
        <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>
                        <Border x:Name="BorderVisual"
                                SnapsToDevicePixels="True"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <ContentPresenter x:Name="Content"
                                    TextBlock.Foreground="{TemplateBinding Foreground}"
                                    Margin="{TemplateBinding Padding}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    RecognizesAccessKey="True"/>
                        </Border>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                BorderThickness="{telerik1:Office2016Resource ResourceKey=FocusThickness}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                SnapsToDevicePixels="True"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>

                        <!-- hovered and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- pressed and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsFocused" Value="True"/>
                                <Condition Property="IsPressed" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- disabled -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                        </MultiTrigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadPathButtonPathStyle" TargetType="Path">
        <Setter Property="Fill" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <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:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
        <Setter Property="PathStyle" Value="{StaticResource RadPathButtonPathStyle}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadPathButton">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <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" Margin="0 3 0 0">
                                    <ContentPresenter x:Name="Content"
                                            TextBlock.Foreground="{TemplateBinding Foreground}"
                                            Margin="{TemplateBinding ContentMargin}"
                                            Content="{TemplateBinding Content}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                            RecognizesAccessKey="True"/>
                                </Grid>
                            </Grid>
                        </Border>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                BorderThickness="{telerik1:Office2016Resource ResourceKey=FocusThickness}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                SnapsToDevicePixels="True"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="Path" Property="Fill" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="Path" Property="Fill" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>

                        <!-- hovered and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- pressed and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsFocused" Value="True"/>
                                <Condition Property="IsPressed" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- disabled -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="Path" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="Path" Property="Fill" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="Path" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="Path" Property="Fill" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- content & content template are not preset -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Content" Value="{x:Null}"/>
                                <Condition Property="ContentTemplate" Value="{x:Null}"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="ContentHost" Property="Visibility" Value="Collapsed"/>
                        </MultiTrigger>

                        <!-- content placement -->
                        <Trigger Property="ContentPlacement" Value="Left">
                            <Setter TargetName="ContentHost" Property="Grid.Column" Value="0"/>
                            <Setter TargetName="ContentHost" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="ContentHost" Property="Margin" Value="0 0 3 0"/>
                        </Trigger>
                        <Trigger Property="ContentPlacement" Value="Right">
                            <Setter TargetName="ContentHost" Property="Grid.Column" Value="2"/>
                            <Setter TargetName="ContentHost" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="ContentHost" Property="Margin" Value="3 0 0 0"/>
                        </Trigger>
                        <Trigger Property="ContentPlacement" Value="Top">
                            <Setter TargetName="ContentHost" Property="Grid.Column" Value="1"/>
                            <Setter TargetName="ContentHost" Property="Grid.Row" Value="0"/>
                            <Setter TargetName="ContentHost" Property="Margin" Value="0 0 0 3"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadToggleButtonStyle" TargetType="telerik1:RadToggleButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
        <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>
                        <Border
                                SnapsToDevicePixels="True"
                                x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <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"/>
                        </Border>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                BorderThickness="{telerik1:Office2016Resource ResourceKey=FocusThickness}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                SnapsToDevicePixels="True"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                        </Trigger>

                        <!-- checked & focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsFocused" Value="True"/>
                                <Condition Property="IsChecked" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Margin" Value="1"/>
                        </MultiTrigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>

                        <!-- disabled -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                        </MultiTrigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- disabled & checked -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsChecked" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRadioButtonStyle" TargetType="telerik1:RadRadioButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
        <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>
                        <Border
                                SnapsToDevicePixels="True"
                                x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <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"/>
                        </Border>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                BorderThickness="{telerik1:Office2016Resource ResourceKey=FocusThickness}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                SnapsToDevicePixels="True"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                        </Trigger>

                        <!-- checked & focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsFocused" Value="True"/>
                                <Condition Property="IsChecked" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Margin" Value="1"/>
                        </MultiTrigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>

                        <!-- disabled -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                        </MultiTrigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- disabled & checked -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsChecked" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadDropDownButtonStyle" TargetType="telerik1:RadDropDownButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadDropDownButton">
                    <Grid SnapsToDevicePixels="True">
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding CornerRadius}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <ContentPresenter x:Name="Content"
                                        Grid.Row="1"
                                        Grid.Column="1"
                                        TextBlock.Foreground="{TemplateBinding Foreground}"
                                        Margin="{TemplateBinding Padding}"
                                        Content="{TemplateBinding Content}"
                                        ContentTemplate="{TemplateBinding ContentTemplate}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                        ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                        RecognizesAccessKey="True"/>
                                <Grid x:Name="DropDownIndicator"
                                        IsHitTestVisible="False"
                                        Grid.Column="1"
                                        Grid.Row="2"
                                        Margin="2 6"
                                        HorizontalAlignment="Center"
                                        Canvas.ZIndex="2"
                                        VerticalAlignment="Center"
                                        Visibility="{TemplateBinding DropDownIndicatorVisibility}">
                                    <TextBlock x:Name="arrow"
                                            Text="{StaticResource GlyphArrow60Down}"
                                            FontSize="12"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                            FontFamily="{StaticResource TelerikWebUI}"/>
                                </Grid>
                            </Grid>
                        </Border>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                SnapsToDevicePixels="True"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom" HorizontalOffset="0" VerticalOffset="1">
                            <Border x:Name="DropDownPopupBorder"
                                    BorderThickness="1"
                                    MinWidth="3"
                                    MinHeight="3"
                                    Width="{TemplateBinding DropDownWidth}"
                                    Height="{TemplateBinding DropDownHeight}"
                                    MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                    MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                    Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                                    BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}">
                                <ContentControl x:Name="DropDownPopupContent"
                                        Content="{TemplateBinding DropDownContent}"
                                        HorizontalContentAlignment="Stretch"
                                        VerticalContentAlignment="Stretch"
                                        ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch"
                                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"
                                        ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
                            </Border>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="arrow" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="arrow" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsOpen" Value="True">
                            <Setter TargetName="arrow" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>

                        <!-- disabled -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="arrow" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                        </MultiTrigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="arrow" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                        <Trigger Property="DropDownButtonPosition" Value="Bottom"/>
                        <Trigger Property="DropDownButtonPosition" Value="Left">
                            <Setter TargetName="DropDownIndicator" Property="Grid.Column" Value="0"/>
                            <Setter TargetName="DropDownIndicator" Property="Grid.Row" Value="1"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Top">
                            <Setter TargetName="DropDownIndicator" Property="Grid.Column" Value="1"/>
                            <Setter TargetName="DropDownIndicator" Property="Grid.Row" Value="0"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Right">
                            <Setter TargetName="DropDownIndicator" Property="Grid.Column" Value="2"/>
                            <Setter TargetName="DropDownIndicator" Property="Grid.Row" Value="1"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Bottom"/>
                        <Trigger Property="DropDownPlacement" Value="Top">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="0"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="-1"/>
                            <Setter TargetName="arrow" Property="TextBlock.Text" Value="{StaticResource GlyphArrow60Up}"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Left">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="-1"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="0"/>
                            <Setter TargetName="arrow" Property="TextBlock.Text" Value="{StaticResource GlyphArrow60Left}"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Right">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="1"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="0"/>
                            <Setter TargetName="arrow" Property="TextBlock.Text" Value="{StaticResource GlyphArrow60Right}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="SplitButtonPartStyle" TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Visibility" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=IsButtonPartVisible, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <Setter Property="Background" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Padding" Value="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="IsBackgroundVisible" Value="{Binding IsBackgroundVisible, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="MinHeight" Value="{Binding MinHeight, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Focusable" Value="False"/>
    </Style>
    <Style x:Key="SplitToggleButtonStyle" TargetType="telerik1:RadToggleButton" BasedOn="{StaticResource RadToggleButtonStyle}">
        <Setter Property="Margin" Value="-1 0 0 0"/>
        <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="BorderBrush" Value="{Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Background" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Padding" Value="2 6"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadToggleButton">
                    <Border
                            SnapsToDevicePixels="True"
                            x:Name="BorderVisual"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"
                            CornerRadius="{TemplateBinding CornerRadius}">
                        <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"/>
                    </Border>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsChecked" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>

                        <!-- disabled -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="Transparent"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadSplitButtonStyle" TargetType="telerik1:RadSplitButton">
        <Setter Property="ButtonPartStyle" Value="{StaticResource SplitButtonPartStyle}"/>
        <Setter Property="TogglePartStyle" Value="{StaticResource SplitToggleButtonStyle}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="true"/>
        <Setter Property="IsOpen" Value="false"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadSplitButton">
                    <Grid SnapsToDevicePixels="True">
                        <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"
                                    Style="{TemplateBinding ButtonPartStyle}"
                                    Grid.Row="1"
                                    Grid.Column="1"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"/>
                            <telerik1:RadToggleButton x:Name="DropDownPart"
                                    IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                    Style="{TemplateBinding TogglePartStyle}"
                                    Grid.Row="1"
                                    Grid.Column="2"
                                    IsBackgroundVisible="{TemplateBinding IsBackgroundVisible}"
                                    Visibility="{TemplateBinding DropDownIndicatorVisibility}">
                                <telerik1:RadToggleButton.Content>
                                    <TextBlock x:Name="arrow"
                                            Text="{StaticResource GlyphArrow60Down}"
                                            FontSize="12"
                                            Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=telerik1:RadToggleButton}}"
                                            FontFamily="{StaticResource TelerikWebUI}"/>
                                </telerik1:RadToggleButton.Content>
                            </telerik1:RadToggleButton>
                        </Grid>
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Background="{x:Null}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                IsHitTestVisible="False"/>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                SnapsToDevicePixels="True"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Popup x:Name="DropDownPopup" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom" HorizontalOffset="0" VerticalOffset="1">
                            <Border x:Name="DropDownPopupBorder"
                                    BorderThickness="1"
                                    MinWidth="3"
                                    MinHeight="3"
                                    Width="{TemplateBinding DropDownWidth}"
                                    Height="{TemplateBinding DropDownHeight}"
                                    MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                    MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                    Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                                    BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}"
                                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
                                <ContentControl x:Name="DropDownPopupContent"
                                        Content="{TemplateBinding DropDownContent}"
                                        ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                        HorizontalContentAlignment="Stretch"
                                        VerticalContentAlignment="Stretch"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch"
                                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                            </Border>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>

                        <!-- background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsOpen" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                            <Setter TargetName="DropDownPart" Property="Background" Value="Transparent"/>
                            <Setter TargetName="DropDownPart" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- focused -->
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                        </Trigger>

                        <!-- mouse over & opened -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="DropDownPart" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </Trigger>

                        <!-- disabled -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="DropDownPart" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                        </MultiTrigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </MultiTrigger>

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="DropDownPart" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="Transparent"/>
                            <Setter TargetName="DropDownPart" Property="Background" Value="Transparent"/>
                            <Setter TargetName="DropDownPart" Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- enabled & opened -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsOpen" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="ButtonPart" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="ButtonPart" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="ButtonPart" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="DropDownPart" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="DropDownPart" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="DropDownPart" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </MultiTrigger>

                        <!-- DropDownButton Position -->
                        <Trigger Property="DropDownButtonPosition" Value="Bottom">
                            <Setter TargetName="DropDownPart" Property="Grid.Column" Value="1"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Row" Value="2"/>
                            <Setter TargetName="DropDownPart" Property="Margin" Value="0 -1 0 0"/>
                            <Setter TargetName="DropDownPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusBottom}"/>
                            <Setter TargetName="ButtonPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusTop}"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Left">
                            <Setter TargetName="DropDownPart" Property="Grid.Column" Value="0"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="DropDownPart" Property="Margin" Value="0 0 -1 0"/>
                            <Setter TargetName="DropDownPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusLeft}"/>
                            <Setter TargetName="ButtonPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusRight}"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Top">
                            <Setter TargetName="DropDownPart" Property="Grid.Column" Value="1"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Row" Value="0"/>
                            <Setter TargetName="DropDownPart" Property="Margin" Value="0 0 0 -1"/>
                            <Setter TargetName="DropDownPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusTop}"/>
                            <Setter TargetName="ButtonPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusBottom}"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Right">
                            <Setter TargetName="DropDownPart" Property="Grid.Column" Value="2"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="DropDownPart" Property="Margin" Value="-1 0 0 0"/>
                            <Setter TargetName="DropDownPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusRight}"/>
                            <Setter TargetName="ButtonPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusLeft}"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Bottom"/>
                        <Trigger Property="DropDownPlacement" Value="Top">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="0"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="-1"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Left">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="-1"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="0"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Right">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="1"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="0"/>
                        </Trigger>

                        <!-- ButtonPartVisibility - Hidden -->
                        <Trigger Property="IsButtonPartVisible" Value="False">
                            <Setter TargetName="DropDownPart" Property="Margin" Value="0"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Row" Value="0"/>
                            <Setter TargetName="DropDownPart" Property="Grid.RowSpan" Value="3"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Column" Value="0"/>
                            <Setter TargetName="DropDownPart" Property="Grid.ColumnSpan" Value="3"/>
                            <Setter TargetName="DropDownPart" Property="IsTabStop" Value="True"/>
                            <Setter TargetName="DropDownPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                            <Setter TargetName="ButtonPart" Property="Visibility" Value="Collapsed"/>
                        </Trigger>

                        <!-- DropDownIndicatorVisibility - Hidden -->
                        <Trigger Property="DropDownIndicatorVisibility" Value="Collapsed">
                            <Setter TargetName="ButtonPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Bottom"/>
                        <Trigger Property="DropDownPlacement" Value="Top">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="0"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="-1"/>
                            <Setter TargetName="arrow" Property="TextBlock.Text" Value="{StaticResource GlyphArrow60Up}"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Left">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="-1"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="0"/>
                            <Setter TargetName="arrow" Property="TextBlock.Text" Value="{StaticResource GlyphArrow60Left}"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Right">
                            <Setter TargetName="DropDownPopup" Property="HorizontalOffset" Value="1"/>
                            <Setter TargetName="DropDownPopup" Property="VerticalOffset" Value="0"/>
                            <Setter TargetName="arrow" Property="TextBlock.Text" Value="{StaticResource GlyphArrow60Right}"/>
                        </Trigger>
                        <DataTrigger Binding="{Binding ElementName=DropDownPart, Path=IsMouseOver}" Value="True">
                            <Setter TargetName="DropDownPart" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </DataTrigger>

                        <!-- IsPressed -->
                        <DataTrigger Binding="{Binding ElementName=ButtonPart, Path=IsPressed}" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="DropDownPart" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding ElementName=DropDownPart, Path=IsPressed}" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="DropDownPart" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=SelectedBrush}"/>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </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}"/>
    <Style x:Key="IncreaseHandleStyle" TargetType="RepeatButton">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="20"/>
        <Setter Property="Height" Value="20"/>
        <Setter Property="Margin" Value="4 0 0 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <TextBlock x:Name="Mark"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Text="{StaticResource GlyphArrow60Right}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    FontSize="16"
                                    Padding="1 0 0 0"
                                    Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                        </Border>
                        <Border x:Name="FocusVisual"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                BorderThickness="{telerik1:Office2016Resource ResourceKey=FocusThickness}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Opacity="0"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="Mark" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="Mark" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Mark" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DecreaseHandleStyle" TargetType="RepeatButton">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Width" Value="20"/>
        <Setter Property="Height" Value="20"/>
        <Setter Property="Margin" Value="0 0 4 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <TextBlock x:Name="Mark"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Text="{StaticResource GlyphArrow60Left}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    FontSize="16"
                                    Padding="0 0 1 0"
                                    Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                        </Border>
                        <Border x:Name="FocusVisual"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                BorderThickness="{telerik1:Office2016Resource ResourceKey=FocusThickness}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Opacity="0"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="Mark" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="Mark" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Mark" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </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="16"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Focusable" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Border x:Name="BorderVisual"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="Thumb" x:Key="SelectionMiddleThumbStyle">
        <Setter Property="Height" Value="4"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <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>
                        <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DataTemplate x:Key="DefaultTicksTemplate">
        <Rectangle Width="1" ToolTipService.ToolTip="{Binding}" Height="5" Fill="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
    </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="4"/>
        <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:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource 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"/>
                            </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>
                        </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" VerticalAlignment="Center">
                                <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.Triggers>
                        <Trigger Property="IsSelectionRangeEnabled" Value="True">
                            <Setter TargetName="SingleThumbHost" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="RangeThumbsPanel" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="TickPlacement" Value="None">
                            <Setter TargetName="TopTickBar" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="BottomTickBar" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="TickPlacement" Value="Both">
                            <Setter TargetName="TopTickBar" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="BottomTickBar" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="TickPlacement" Value="BottomRight">
                            <Setter TargetName="TopTickBar" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="BottomTickBar" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="TickPlacement" Value="TopLeft">
                            <Setter TargetName="TopTickBar" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="BottomTickBar" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </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="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource 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>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" MinWidth="26"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="BorderVisual" Grid.ColumnSpan="2" Background="Transparent"/>

                        <!-- this x:Name is called from code -->
                        <Border x:Name="rectangleborder" BorderBrush="{TemplateBinding BorderBrush}" VerticalAlignment="Center" HorizontalAlignment="Center" BorderThickness="1" Margin="4 3 3 3">
                            <Rectangle Fill="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center" Width="16" Height="16"/>
                        </Border>
                        <ContentControl
                                Grid.Column="1"
                                x:Name="contentPresenter"
                                Margin="2 0 0 0"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Left"
                                Foreground="{TemplateBinding Foreground}"
                                FontSize="{TemplateBinding FontSize}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </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">
                        <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="{telerik1:Office2016Resource ResourceKey=BasicBrush}">
                            <Border BorderThickness="1" x:Name="InnerborderContent"/>
                        </Border>
                        <Border x:Name="BorderVisual"
                                MinHeight="13"
                                MinWidth="13"
                                VerticalAlignment="Stretch"
                                BorderThickness="1"
                                Opacity="0"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentBrush}">
                            <Border BorderThickness="1" BorderBrush="White"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="BorderVisual" Value="1"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Opacity" TargetName="BorderVisual" Value="1"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Opacity" TargetName="BorderVisual" Value="1"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="Content" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadColorPaletteViewStyle" TargetType="telerikInput:RadColorPaletteView">
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="0"/>
        <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 4"/>
                    </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>
    </Style>
    <Style x:Key="RadColorSelectorStyle" TargetType="telerikInput:RadColorSelector">
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource 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:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <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}"
                                    Padding="4"
                                    MinHeight="26"
                                    x:Name="PaletteHeader"
                                    Grid.Row="0"
                                    Background="{TemplateBinding Background}"
                                    Tag="{Binding AutomaticColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource converter}}"
                                    Style="{StaticResource RadColorPicker_HeaderButtonStyle}"/>
                            <Border Grid.Row="1" Background="{telerik1:Office2016Resource ResourceKey=SelectedBrush}" Margin="1 0 1 0" MinHeight="26">
                                <TextBlock x:Name="mainPaletteHeader"
                                        FontStyle="{TemplateBinding FontStyle}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        Foreground="{TemplateBinding Foreground}"
                                        FontSize="{TemplateBinding FontSize}"
                                        Text="{TemplateBinding MainPaletteHeaderText}"
                                        VerticalAlignment="Center"
                                        Margin="4"/>
                            </Border>
                            <telerikInput:RadColorPaletteView x:Name="HeaderPalette"
                                    Grid.Row="2"
                                    Margin="2 0"
                                    ItemTemplate="{TemplateBinding PaletteItemsTemplate}"
                                    ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                    VerticalAlignment="Center"
                                    Background="{TemplateBinding Background}"
                                    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="2 -3 2 0"
                                    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="{telerik1:Office2016Resource ResourceKey=SelectedBrush}" Margin="1 2 1 2" MinHeight="26">
                                <TextBlock x:Name="standardPaletteHeader"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        Foreground="{TemplateBinding Foreground}"
                                        FontSize="{TemplateBinding FontSize}"
                                        VerticalAlignment="Center"
                                        Text="{TemplateBinding StandardPaletteHeaderText}"
                                        Margin="4"/>
                            </Border>
                            <telerikInput:RadColorPaletteView x:Name="StandartPalette"
                                    Margin="2 0"
                                    Grid.Row="5"
                                    ItemTemplate="{TemplateBinding PaletteItemsTemplate}"
                                    ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                    VerticalAlignment="Center"
                                    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="{telerik1:Office2016Resource ResourceKey=SelectedBrush}"
                                    Margin="1 2 1 2"
                                    MinHeight="26">
                                <TextBlock x:Name="RecentColorsPaletteHeader"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        Foreground="{TemplateBinding Foreground}"
                                        FontSize="{TemplateBinding FontSize}"
                                        VerticalAlignment="Center"
                                        Text="{TemplateBinding RecentColorsHeaderText}"
                                        Margin="4"/>
                            </Border>
                            <telerikInput:RadColorPaletteView
                                    Grid.Row="7"
                                    x:Name="RecentColorsPalette"
                                    Margin="2 0"
                                    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="1" Content="{TemplateBinding AdditionalContent}" ContentTemplate="{TemplateBinding AdditionalContentTemplate}"/>
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ColorPickerButtonPartStyle" TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}"/>
        <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}"/>
        <Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FontSize}"/>
        <Setter Property="MinHeight" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MinHeight}"/>
        <Setter Property="Visibility" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsButtonPartVisible, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay}"/>
        <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderBrush}"/>
        <Setter Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness}"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ColorPickerSplitButtonStyle" TargetType="telerik1:RadSplitButton" BasedOn="{StaticResource RadSplitButtonStyle}">
        <Setter Property="ButtonPartStyle" Value="{StaticResource ColorPickerButtonPartStyle}"/>
    </Style>
    <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="{telerik1:Office2016Resource 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="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="AutomaticColor" Value="Black"/>
        <Setter Property="Width" Value="43"/>
        <Setter Property="Height" Value="26"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid VerticalAlignment="Stretch">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Column="1" VerticalAlignment="Center">
                            <TextBlock
                                    Text="{StaticResource GlyphForegroundColor}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    FontSize="16"
                                    FontWeight="Normal"
                                    Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik1:RadButton}, Mode=FindAncestor}, Path=Foreground, Mode=OneWay}"
                                    SnapsToDevicePixels="True"/>
                            <Rectangle Width="16" Height="3">
                                <Rectangle.Fill>
                                    <SolidColorBrush Color="{Binding}"/>
                                </Rectangle.Fill>
                            </Rectangle>
                        </StackPanel>
                    </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}"
                                FontWeight="Normal"
                                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="#01FFFFFF">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto" MinWidth="18"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="ToggleButtonBackground"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <TextBlock x:Name="DropDownIcon"
                    Grid.Column="1"
                    Text="{StaticResource GlyphArrow60Down}"
                    FontFamily="{StaticResource TelerikWebUI}"
                    FontSize="12"
                    Foreground="{TemplateBinding Foreground}"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"/>
            <Grid Grid.Column="0" Margin="2 0 0 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>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEnabled" Value="True"/>
                    <Condition Property="IsMouseOver" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter Property="Background" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter Property="BorderBrush" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter Property="BorderBrush" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter Property="Background" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="DropDownIcon" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="NonEditableComboToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="Template" Value="{StaticResource NonEditableComboToggleButtonControlTemplate}"/>
    </Style>
    <ControlTemplate x:Key="EditableComboToggleButtonControlTemplate" TargetType="telerik:RadToggleButton">
        <Grid>
            <Border x:Name="ToggleButtonBackground"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusRight}"/>
            <TextBlock x:Name="DropDownIcon"
                    Text="{StaticResource GlyphArrow60Down}"
                    FontFamily="{StaticResource TelerikWebUI}"
                    FontSize="12"
                    Foreground="{TemplateBinding Foreground}"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="BorderBrush" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter Property="Background" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter Property="BorderBrush" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="DropDownIcon" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter Property="Background" TargetName="ToggleButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="EditableComboToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Width" Value="18"/>
        <Setter Property="Template" Value="{StaticResource EditableComboToggleButtonControlTemplate}"/>
    </Style>
    <Style x:Key="ComboBoxTextBoxStyle" TargetType="TextBox">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="CaretBrush" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Margin" Value="0 1"/>
    </Style>
    <ControlTemplate x:Key="EditableComboBox" TargetType="telerikInput:RadComboBox">
        <Grid x:Name="VisualRoot">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BackgroundVisual"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <TextBox x:Name="PART_EditableTextBox"
                    Grid.Column="0"
                    VerticalAlignment="Stretch"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    VerticalContentAlignment="Center"
                    Style="{StaticResource ComboBoxTextBoxStyle}">
                <TextBox.Template>
                    <ControlTemplate TargetType="TextBox">
                        <Grid>
                            <Border x:Name="BorderVisual"
                                    Background="{TemplateBinding Background}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusLeft}"/>
                            <Border x:Name="ReadOnlyVisual"
                                    BorderBrush="{telerik1:Office2016Resource ResourceKey=ReadOnlyBorderBrush}"
                                    Background="{telerik1:Office2016Resource ResourceKey=ReadOnlyBackgroundBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusLeft}"
                                    Opacity="0"/>
                            <ScrollViewer x:Name="PART_ContentHost"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    Background="Transparent"
                                    IsTabStop="False"
                                    VerticalScrollBarVisibility="Auto"
                                    VerticalContentAlignment="Stretch"
                                    Padding="{TemplateBinding Padding}"
                                    Margin="-1 0 0 0"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                                <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            </Trigger>
                            <Trigger Property="IsReadOnly" Value="True">
                                <Setter TargetName="ReadOnlyVisual" Property="Opacity" Value="1"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </TextBox.Template>
            </TextBox>
            <telerik:RadToggleButton x:Name="PART_DropDownButton"
                    Grid.Column="1"
                    IsTabStop="False"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Style="{StaticResource EditableComboToggleButtonStyle}"
                    Background="{Binding Background, ElementName=PART_EditableTextBox}"
                    ClickMode="Press"/>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <TextBlock x:Name="Watermark"
                    Text="{TemplateBinding EmptyText}"
                    IsHitTestVisible="False"
                    Padding="{TemplateBinding Padding}"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Left"
                    Visibility="Collapsed"
                    Margin="2 0 0 0"
                    Foreground="{TemplateBinding Foreground}"/>
            <Popup x:Name="PART_Popup" VerticalOffset="0">
                <Grid x:Name="PopupRoot">
                    <Border x:Name="PART_ResizeBorder"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                            Margin="0 1 0 0"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
                        <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}">
                                <ItemsPresenter Margin="0 0 0 -1"/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="Watermark" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsWatermarkVisible" Value="True">
                <Setter TargetName="Watermark" Property="Visibility" Value="Visible"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="IsMouseOver" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
            </Trigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter TargetName="PART_DropDownButton" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter TargetName="PART_DropDownButton" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter TargetName="PART_DropDownButton" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="NonEditableComboBox" TargetType="telerikInput:RadComboBox">
        <Grid x:Name="VisualRoot">
            <Border x:Name="BackgroundVisual"
                    IsHitTestVisible="False"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <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}"
                    FontFamily="{TemplateBinding FontFamily}"
                    FontSize="{TemplateBinding FontSize}"
                    ClickMode="Press"/>
            <Border x:Name="FocusVisual"
                    IsHitTestVisible="False"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Visibility="Collapsed"
                    Background="Transparent"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <Popup x:Name="PART_Popup" VerticalOffset="0">
                <Grid x:Name="PopupRoot">
                    <Border x:Name="PART_ResizeBorder"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                            Margin="0 1 0 0">
                        <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}">
                                <ItemsPresenter Margin="0 0 0 -1"/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="IsMouseOver" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="FocusVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="BackgroundVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadComboBoxItemStyle" TargetType="telerikInput:RadComboBoxItem">
        <Setter Property="Padding" Value="4"/>
        <Setter Property="BorderThickness" Value="0 0 0 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}"
                            CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                        </Trigger>
                        <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="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=SelectedBrush}"/>
                            </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="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="3 2"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Continue"/>
    </Style>
    <Style TargetType="telerikInput:RadComboBoxItem" BasedOn="{StaticResource RadComboBoxItemStyle}"/>
    <Style TargetType="telerikInput:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle}"/>
    <SolidColorBrush x:Key="WindowModalBackground" Color="#FFCCE4FC"/>

    <!-- RadWindow Styles -->
    <DataTemplate x:Key="AlertIconTemplate">
        <TextBlock Text="{StaticResource GlyphWarning}" FontSize="64" FontFamily="{StaticResource TelerikWebUI}" Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
    </DataTemplate>
    <DataTemplate x:Key="ConfirmIconTemplate">
        <TextBlock Text="{StaticResource GlyphQuestion}" FontSize="64" FontFamily="{StaticResource TelerikWebUI}" Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
    </DataTemplate>
    <Style x:Key="WindowButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Height" Value="30"/>
        <Setter Property="Width" Value="45"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Bottom"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>
                        <Border x:Name="BorderVisual" Background="Transparent" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="WindowCloseButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Height" Value="30"/>
        <Setter Property="Width" Value="45"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Bottom"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>
                        <Border x:Name="BorderVisual" Background="Transparent" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <Border x:Name="PressedVisual"
                                Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                Opacity="0"/>
                        <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=ValidationBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=ValidationBrush}"/>
                            <Setter TargetName="PressedVisual" Property="Opacity" Value="0.5"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadWindowTemplate" TargetType="telerikNavigation:RadWindow">
        <Grid x:Name="LayoutRoot">
            <Border x:Name="WindowOuterBorder"
                    Grid.RowSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
                <AdornerDecorator>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" MinHeight="30"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="Header" Background="{telerik1:Office2016Resource ResourceKey=MainBrush}" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusTop}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Grid Grid.Column="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="4 2 0 2"/>
                                    <ContentControl x:Name="HeaderContent"
                                            Grid.Column="1"
                                            Margin="4 0"
                                            IsTabStop="False"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Center"
                                            HorizontalContentAlignment="Stretch"
                                            Content="{TemplateBinding Header}"
                                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                                            SnapsToDevicePixels="True"
                                            ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                            FontSize="{TemplateBinding FontSize}"
                                            FontFamily="{TemplateBinding FontFamily}"/>
                                </Grid>
                                <Border x:Name="PART_HeaderButtonsBorder" Grid.Column="1">
                                    <StackPanel x:Name="HeaderButtons" Grid.Column="1" Orientation="Horizontal">
                                        <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>
                                            <TextBlock
                                                    Text="{StaticResource GlyphMinimize}"
                                                    FontSize="16"
                                                    FontFamily="{StaticResource TelerikWebUI}"
                                                    Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"
                                                    VerticalAlignment="Center"
                                                    HorizontalAlignment="Center"/>
                                        </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>
                                            <TextBlock
                                                    Text="{StaticResource GlyphWindowCollapse}"
                                                    FontSize="16"
                                                    FontFamily="{StaticResource TelerikWebUI}"
                                                    Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"
                                                    VerticalAlignment="Center"
                                                    HorizontalAlignment="Center"/>
                                        </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>
                                            <TextBlock
                                                    Text="{StaticResource GlyphWindow}"
                                                    FontSize="16"
                                                    FontFamily="{StaticResource TelerikWebUI}"
                                                    Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"
                                                    VerticalAlignment="Center"
                                                    HorizontalAlignment="Center"/>
                                        </telerik:RadButton>
                                        <telerik:RadButton x:Name="PART_CloseButton"
                                                Command="{x:Static telerik:WindowCommands.Close}"
                                                Style="{StaticResource WindowCloseButtonStyle}"
                                                Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}}">
                                            <ToolTipService.ToolTip>
                                                <ToolTip telerik:LocalizationManager.ResourceKey="Close"/>
                                            </ToolTipService.ToolTip>
                                            <TextBlock
                                                    Text="{StaticResource GlyphClose}"
                                                    FontSize="16"
                                                    FontFamily="{StaticResource TelerikWebUI}"
                                                    Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadButton}}}"
                                                    VerticalAlignment="Center"
                                                    HorizontalAlignment="Center"/>
                                        </telerik:RadButton>
                                    </StackPanel>
                                </Border>
                            </Grid>
                        </Border>
                        <ContentPresenter x:Name="ContentElement" Grid.Row="1" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                    </Grid>
                </AdornerDecorator>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="WindowState" Value="Maximized">
                <Setter TargetName="WindowOuterBorder" Property="BorderThickness" Value="0"/>
                <Setter TargetName="HeaderButtons" Property="Margin" Value="0"/>
            </Trigger>
            <Trigger Property="WindowState" Value="Minimized">
                <Setter TargetName="HeaderButtons" Property="Margin" Value="0"/>
                <Setter TargetName="LayoutRoot" Property="HorizontalAlignment" Value="Left"/>
                <Setter TargetName="LayoutRoot" Property="VerticalAlignment" Value="Top"/>
                <Setter TargetName="PART_MinimizeButton" Property="Width" Value="30"/>
                <Setter TargetName="PART_RestoreButton" Property="Width" Value="30"/>
                <Setter TargetName="PART_MaximizeButton" Property="Width" Value="30"/>
                <Setter TargetName="PART_CloseButton" Property="Width" Value="30"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Content" SourceName="IconContent" Value="{x:Null}"/>
                    <Condition Property="ContentTemplate" SourceName="IconContent" Value="{x:Null}"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="IconContent" Property="Visibility" Value="Collapsed"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadWindowStyle" TargetType="telerikNavigation:RadWindow">
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBackground" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="MinHeight" Value="30"/>
        <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="CaptionHeight" Value="30"/>
        <Setter Property="ResizeBorder" Value="5"/>
        <Setter Property="Template" Value="{StaticResource RadWindowTemplate}"/>
        <Setter Property="ModalBackground" Value="{StaticResource WindowModalBackground}"/>
        <Setter Property="animation:AnimationManager.AnimationSelector">
            <Setter.Value>
                <animation:AnimationSelector>
                    <animation:AnimationGroup AnimationName="Show">
                        <animation:FadeAnimation Direction="In" TargetElementName="LayoutRoot"/>
                        <animation:ScaleAnimation Direction="In" TargetElementName="LayoutRoot" MinScale="0.9"/>
                    </animation:AnimationGroup>
                    <animation:AnimationGroup AnimationName="Hide">
                        <animation:FadeAnimation Direction="Out" TargetElementName="LayoutRoot"/>
                        <animation:ScaleAnimation Direction="Out" TargetElementName="LayoutRoot" MinScale="0.9"/>
                    </animation:AnimationGroup>
                </animation:AnimationSelector>
            </Setter.Value>
        </Setter>
        <Setter Property="navigation:RadWindowInteropHelper.OpaqueWindowBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
        <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="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="IconTemplate" Value="{StaticResource ConfirmIconTemplate}"/>
        <Setter Property="Width" Value="350"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadPrompt">
                    <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
                        <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="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 7 0"/>
                            </ScrollViewer>
                            <TextBox IsTabStop="True" TabIndex="0" x:Name="PromptTextBox" Margin="8 0 7 8" Focusable="True"/>
                        </StackPanel>
                        <StackPanel x:Name="DialogButtons" Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
                            <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 7 7 7"/>
                            <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 7 7 7"/>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadConfirmStyle" TargetType="telerikNavigation:RadConfirm">
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="MinWidth" Value="275"/>
        <Setter Property="MaxWidth" Value="500"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="IconTemplate" Value="{StaticResource ConfirmIconTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadConfirm">
                    <Grid x:Name="LayoutRoot" FocusManager.FocusedElement="{Binding ElementName=OK}" Background="{TemplateBinding Background}">
                        <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="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 7 0"/>
                        </ScrollViewer>
                        <StackPanel x:Name="DialogButtons" Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
                            <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 7 7 7"/>
                            <telerik:RadButton x:Name="Cancel"
                                    Command="{x:Static telerik:WindowCommands.Cancel}"
                                    telerikNavigation:RadWindow.ResponseButton="Cancel"
                                    MinWidth="70"
                                    Margin="0 7 7 7"
                                    HorizontalAlignment="Right"
                                    telerik:LocalizationManager.ResourceKey="Cancel"/>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadAlertStyle" TargetType="telerikNavigation:RadAlert">
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinWidth" Value="275"/>
        <Setter Property="MaxWidth" Value="500"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="IconTemplate" Value="{StaticResource AlertIconTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikNavigation:RadAlert">
                    <Grid x:Name="LayoutRoot" FocusManager.FocusedElement="{Binding ElementName=OK}" Background="{TemplateBinding Background}">
                        <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="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 7 0"/>
                        </ScrollViewer>
                        <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 7 7 7"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikNavigation:RadAlert" BasedOn="{StaticResource RadAlertStyle}"/>
    <Style TargetType="telerikNavigation:RadPrompt" BasedOn="{StaticResource RadPromptStyle}"/>
    <Style TargetType="telerikNavigation:RadConfirm" BasedOn="{StaticResource RadConfirmStyle}"/>
    <telerik:BooleanToVisibilityConverter x:Key="RibbonBooleanToVisibilityConverter"/>
    <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertBoolToVisConverter"/>
    <telerikRibbonView:BooleanToWindowStateConverter x:Key="BooleanToWindowStateConverter"/>
    <telerikRibbonView:IconConverter x:Key="IconConverter"/>
    <ControlTemplate x:Key="RadRibbonButtonTemplate" TargetType="telerikRibbonView:RadRibbonButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ButtonBackgroundDecorator"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            <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">
                    <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.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Image" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="ContentPresenter" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow1" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow2" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter TargetName="ButtonBackgroundDecorator" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter TargetName="ButtonBackgroundDecorator" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="ButtonBackgroundDecorator" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter TargetName="ButtonBackgroundDecorator" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <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="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonButton" BasedOn="{StaticResource RadRibbonButtonStyle}"/>
    <Style TargetType="telerik:RadToggleButton" x:Key="ToggleButtonStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderBrush" Value="{Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="MinWidth" Value="36"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Grid Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="BorderVisual"
                                Grid.ColumnSpan="2"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"/>
                        <Border Grid.Column="1">
                            <TextBlock x:Name="Path"
                                    Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    FontSize="12"
                                    Text="{StaticResource GlyphArrow60Down}"
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Right"
                                    Margin="3 0"/>
                        </Border>
                        <ContentPresenter x:Name="Content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                            <Setter TargetName="Path" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="EditableRibbonComboBox" TargetType="telerikRibbonView:RadRibbonComboBox">
        <Grid x:Name="ContentPresenterBorder" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <SolidColorBrush Color="Transparent"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="OuterBorderVisual"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <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">
                        <Border Background="{TemplateBinding Background}" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusLeft}">
                            <ScrollViewer
                                    Padding="{TemplateBinding Padding}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{TemplateBinding Background}"
                                    IsTabStop="False"
                                    VerticalScrollBarVisibility="Auto"
                                    Name="PART_ContentHost"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </ControlTemplate>
                </TextBox.Template>
            </TextBox>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    Grid.Column="1"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusRight}"/>
            <telerik:RadToggleButton x:Name="PART_DropDownButton"
                    Grid.Column="1"
                    BorderThickness="0 1 1 1"
                    Style="{StaticResource ToggleButtonStyle}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusRight}"
                    IsTabStop="False"
                    IsChecked="{TemplateBinding IsDropDownOpen}"
                    IsEnabled="{TemplateBinding IsEnabled}"
                    MinWidth="15"/>
            <TextBlock x:Name="Watermark"
                    Text="{TemplateBinding EmptyText}"
                    Opacity="0.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="{telerik1:Office2016Resource 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 1 0 0"
                                    BorderThickness="0"
                                    VerticalScrollBarVisibility="Auto"
                                    Foreground="{TemplateBinding Foreground}"
                                    CanContentScroll="True">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_EditableTextBox" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="Watermark" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
                <Setter TargetName="PART_DropDownButton" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
            </Trigger>
            <Trigger Property="IsWatermarkVisible" Value="True">
                <Setter TargetName="Watermark" Property="Visibility" Value="Visible"/>
            </Trigger>
            <DataTrigger Binding="{Binding ElementName=PART_DropDownButton, Path=IsPressed}" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </DataTrigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter TargetName="PART_DropDownButton" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="IsDropDownOpen" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                <Setter TargetName="PART_DropDownButton" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                <Setter TargetName="PART_DropDownButton" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="NonEditableRibbonComboBox" TargetType="telerikRibbonView:RadRibbonComboBox">
        <Grid x:Name="ContentPresenterBorder" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <SolidColorBrush Color="Transparent"/>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorderVisual" IsHitTestVisible="False" Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <telerik:RadToggleButton x:Name="PART_DropDownButton"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                    Style="{StaticResource ToggleButtonStyle}"
                    ClickMode="Release"
                    Background="{TemplateBinding Background}"
                    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="{telerik1:Office2016Resource 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="IsEnabled" Value="False">
                <Setter TargetName="ContentPresenterElement" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="PART_DropDownButton" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
            </Trigger>
            <DataTrigger Binding="{Binding ElementName=PART_DropDownButton, Path=IsPressed}" Value="True">
                <Setter TargetName="PART_DropDownButton" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter TargetName="PART_DropDownButton" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </DataTrigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter TargetName="PART_DropDownButton" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadRibbonComboBoxStyle" TargetType="telerikRibbonView:RadRibbonComboBox">
        <Setter Property="Template" Value="{StaticResource EditableRibbonComboBox}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="4 2"/>
        <Setter Property="MinHeight" Value="24"/>
        <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 x:Name="BorderVisual"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}"
                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
            <ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}" VerticalAlignment="Center"/>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="True">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Padding" Value="2"/>
        <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="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="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="BorderVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}"/>
            <Grid x:Name="ContentGrid" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Image Name="Image"/>
                <StackPanel x:Name="FirstRowContainer" Grid.Row="1">
                    <ContentPresenter x:Name="ContentPresenter"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            RecognizesAccessKey="True"
                            ContentStringFormat="{TemplateBinding ContentStringFormat}"
                            TextBlock.Foreground="{TemplateBinding Foreground}"/>
                    <TextBlock Name="textRow1" Grid.Row="1" Text="{TemplateBinding TextRow1}" TextAlignment="Center" Foreground="{TemplateBinding Foreground}"/>
                </StackPanel>
                <StackPanel Name="DropDownPanel" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Orientation="Horizontal" Margin="0 -3 0 0">
                    <TextBlock Name="textRow2" Text="{TemplateBinding TextRow2}" Foreground="{TemplateBinding Foreground}"/>
                    <TextBlock x:Name="DropDownIndicator"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Margin="0 4"
                            VerticalAlignment="Center"
                            Text="{StaticResource GlyphArrow60Down}"
                            FontSize="12"
                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                            HorizontalAlignment="Center"
                            FontFamily="{StaticResource TelerikWebUI}"/>
                </StackPanel>
            </Grid>
            <Popup x:Name="DropDownPopup" VerticalOffset="1" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom">
                <Grid>
                    <Border x:Name="DropDownPopupBorder"
                            CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                            BorderThickness="1"
                            Padding="1"
                            Margin="0"
                            MinWidth="3"
                            MinHeight="3"
                            Width="{TemplateBinding DropDownWidth}"
                            Height="{TemplateBinding DropDownHeight}"
                            MaxWidth="{TemplateBinding DropDownMaxWidth}"
                            MaxHeight="{TemplateBinding DropDownMaxHeight}"
                            Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                            BorderBrush="{telerik1:Office2016Resource 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.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Image" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="DropDownIndicator" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="ContentPresenter" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow1" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow2" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
            <Trigger Property="IsOpen" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="DropDownButtonPosition" Value="Right">
                <Setter TargetName="DropDownPanel" Property="Grid.Column" Value="2"/>
                <Setter TargetName="DropDownPanel" Property="Grid.RowSpan" Value="3"/>
                <Setter TargetName="DropDownPanel" Property="Grid.Row" Value="0"/>
                <Setter TargetName="DropDownPanel" Property="VerticalAlignment" Value="Center"/>
                <Setter TargetName="textRow2" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="textRow1" Property="Grid.RowSpan" Value="3"/>
                <Setter TargetName="Image" Property="Grid.RowSpan" Value="3"/>
                <Setter TargetName="ContentPresenter" Property="Grid.RowSpan" Value="3"/>
                <Setter TargetName="ContentPresenter" Property="Grid.Column" Value="1"/>
                <Setter TargetName="FirstRowContainer" Property="Grid.RowSpan" Value="3"/>
                <Setter TargetName="FirstRowContainer" Property="Orientation" Value="Horizontal"/>
                <Setter TargetName="FirstRowContainer" Property="Grid.Column" Value="1"/>
                <Setter TargetName="textRow2" Property="Visibility" Value="Collapsed"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonDropDownButton" BasedOn="{StaticResource RadRibbonDropDownButtonStyle}"/>
    <ControlTemplate x:Key="RadRibbonRadioButtonTemplate" TargetType="telerikRibbonView:RadRibbonRadioButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="BorderVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            <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.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="IsChecked" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderThickness" Value="1"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Image" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="ContentPresenter" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow1" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow2" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Template" Value="{StaticResource RadRibbonRadioButtonTemplate}"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonRadioButton" BasedOn="{StaticResource RadRibbonRadioButtonStyle}"/>
    <Style x:Key="RibbonSplitButtonButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Border x:Name="BorderVisual"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"
                            CornerRadius="{TemplateBinding CornerRadius}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <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"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RibbonSplitToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Border x:Name="BorderVisual"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"
                            CornerRadius="{TemplateBinding CornerRadius}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <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"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadRibbonSplitButtonTemplate" TargetType="telerikRibbonView:RadRibbonSplitButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates"/>
                <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="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <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>
                        </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>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="backgroundDecorator"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    BorderThickness="1"/>
            <Border x:Name="KeyboardNavigationVisual"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            <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"
                        Foreground="{TemplateBinding Foreground}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                        Padding="{TemplateBinding Padding}"
                        Style="{TemplateBinding ButtonPartStyle}"
                        ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                <telerik:RadToggleButton x:Name="DropDownPart"
                        Grid.Row="1"
                        Grid.RowSpan="4"
                        Foreground="{TemplateBinding Foreground}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        MinHeight="0"
                        Grid.ColumnSpan="2"
                        Background="Transparent"
                        IsTabStop="False"
                        Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                        HorizontalAlignment="Stretch"
                        Padding="6"
                        Style="{TemplateBinding TogglePartStyle}"
                        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"
                        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">
                        <TextBlock x:Name="DropDownIndicator"
                                Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                                Margin="0 4"
                                Text="{StaticResource GlyphArrow60Down}"
                                FontSize="12"
                                Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                FontFamily="{StaticResource TelerikWebUI}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"/>
                    </Grid>
                </StackPanel>
            </Grid>
            <Popup x:Name="DropDownPopup"
                    AllowsTransparency="True"
                    StaysOpen="False"
                    Focusable="False"
                    Placement="Bottom"
                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}"
                    VerticalOffset="1">
                <Border x:Name="DropDownPopupBorder"
                        CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                        BorderThickness="1"
                        Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                        MinWidth="3"
                        MinHeight="3"
                        BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}"
                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                        MaxHeight="{TemplateBinding DropDownMaxHeight}">
                    <ContentControl x:Name="DropDownPopupContent"
                            IsTabStop="False"
                            Content="{TemplateBinding DropDownContent}"
                            ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                </Border>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="backgroundDecorator" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="True">
                <Setter TargetName="ButtonPart" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter TargetName="ButtonPart" Property="IsBackgroundVisible" Value="True"/>
            </Trigger>
            <Trigger Property="IsOpen" Value="True">
                <Setter TargetName="ButtonPart" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter TargetName="backgroundDecorator" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter TargetName="backgroundDecorator" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Image" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow1" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow2" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="DropDownIndicator" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="DropDownButtonPosition" Value="Bottom">
                <Setter TargetName="Image" Property="Margin" Value="3 3 3 0"/>
                <Setter TargetName="DropDownPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusBottom}"/>
                <Setter TargetName="ButtonPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusTop}"/>
            </Trigger>
            <Trigger Property="DropDownButtonPosition" Value="Right">
                <Setter TargetName="ButtonPart" Property="Grid.RowSpan" Value="4"/>
                <Setter TargetName="ButtonPart" Property="Grid.ColumnSpan" Value="2"/>
                <Setter TargetName="DropDownPanel" Property="Grid.Column" Value="2"/>
                <Setter TargetName="DropDownPanel" Property="Grid.RowSpan" Value="4"/>
                <Setter TargetName="DropDownPanel" Property="Grid.Row" Value="0"/>
                <Setter TargetName="DropDownPanel" Property="Margin" Value="1 0 0 0"/>
                <Setter TargetName="DropDownPanel" Property="VerticalAlignment" Value="Center"/>
                <Setter TargetName="DropDownPart" Property="Grid.Column" Value="2"/>
                <Setter TargetName="DropDownPart" Property="Grid.Row" Value="0"/>
                <Setter TargetName="textRow1" Property="Grid.Row" Value="0"/>
                <Setter TargetName="textRow1" Property="Grid.RowSpan" Value="4"/>
                <Setter TargetName="textRow1" Property="Grid.Column" Value="1"/>
                <Setter TargetName="textRow1" Property="Grid.ColumnSpan" Value="1"/>
                <Setter TargetName="textRow1" Property="VerticalAlignment" Value="Center"/>
                <Setter TargetName="textRow1" Property="HorizontalAlignment" Value="Left"/>
                <Setter TargetName="textRow1" Property="TextAlignment" Value="Left"/>
                <Setter TargetName="Image" Property="Grid.ColumnSpan" Value="1"/>
                <Setter TargetName="Image" Property="Grid.RowSpan" Value="4"/>
                <Setter TargetName="DropDownPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusRight}"/>
                <Setter TargetName="ButtonPart" Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadiusLeft}"/>
            </Trigger>
            <DataTrigger Binding="{Binding ElementName=ButtonPart, Path=IsPressed}" Value="True">
                <Setter TargetName="backgroundDecorator" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter TargetName="DropDownPart" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding ElementName=DropDownPart, Path=IsPressed}" Value="True">
                <Setter TargetName="backgroundDecorator" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </DataTrigger>
            <Trigger Property="CurrentSize" Value="Large">
                <Setter TargetName="Image" Property="Grid.ColumnSpan" Value="2"/>
            </Trigger>
            <Trigger Property="CurrentSize" Value="Small">
                <Setter TargetName="textRow1" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="textRow2" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="textRow1" Property="Grid.ColumnSpan" Value="1"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="CurrentSize" Value="Medium"/>
                    <Condition Property="IsTextInMiddleButton" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="textRow2" Property="Padding" Value="1 0 3 0"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="CurrentSize" Value="Medium"/>
                    <Condition Property="IsTextInMiddleButton" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="textRow1" Property="Padding" Value="2 0 3 0"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </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="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="TogglePartStyle" Value="{StaticResource RibbonSplitToggleButtonStyle}"/>
        <Setter Property="ButtonPartStyle" Value="{StaticResource RibbonSplitButtonButtonStyle}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
        <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="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="BorderVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    BorderThickness="1"
                    Margin="1"/>
            <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>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter Property="Background" TargetName="BorderVisual" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="IsChecked" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderThickness" Value="1"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Image" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="ContentPresenter" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow1" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow2" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <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}"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonToggleButton" BasedOn="{StaticResource RadRibbonToggleButtonStyle}"/>
    <ControlTemplate x:Key="ApplicationDropDownButtonTemplate" TargetType="telerikRibbonViewPrimitives:RadRibbonApplicationDropDownButton">
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <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="OuterBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <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="White" 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.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="OuterBorder" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter TargetName="OuterBorder" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="OuterBorder" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter TargetName="OuterBorder" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
            <Trigger Property="IsOpen" Value="True">
                <Setter TargetName="isOpenIndicator" Property="Opacity" Value="1"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="ContentGrid" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadRibbonApplicationDropDownButtonStyle" TargetType="telerikRibbonViewPrimitives:RadRibbonApplicationDropDownButton">
        <Setter Property="Padding" Value="13 3"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="MinWidth" Value="58"/>
        <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="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="ItemHeight" Value="35"/>
        <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" Background="{TemplateBinding Background}" 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="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="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Grid>
                    <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="MouseOverSelectedBorder" Opacity="0" BorderThickness="1" BorderBrush="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="IsSelected" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="MouseOverSelectedBorder" Property="Opacity" Value="1"/>
            </MultiTrigger>
            <Trigger Property="IsHeader" Value="True">
                <Setter TargetName="BorderVisual" Property="Margin" Value="5 0 0 0"/>
                <Setter TargetName="Header_Background" Property="Opacity" Value="1"/>
                <Setter TargetName="contentControl" Property="HorizontalAlignment" Value="Left"/>
                <Setter TargetName="BorderVisual" Property="BorderThickness" Value="0"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="contentControl" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="Image" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadGalleryItemStyle" TargetType="telerikRibbonView:RadGalleryItem">
        <Setter Property="Template" Value="{StaticResource RadGalleryItemTemplate}"/>
        <Setter Property="Padding" Value="0"/>
        <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"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="BorderThickness" Value="4"/>
        <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="16"/>
                    </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"
                            Padding="0"
                            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"
                            Margin="-1 -1 -1 0">
                        <TextBlock x:Name="ArrowUp"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Text="{StaticResource GlyphArrow60Up}"
                                FontSize="12"
                                Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                FontFamily="{StaticResource TelerikWebUI}"/>
                        <telerikRibbonView:RadRibbonButton.Style>
                            <Style TargetType="telerikRibbonView:RadRibbonButton" BasedOn="{StaticResource RadRibbonButtonStyle}">
                                <Style.Triggers>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </telerikRibbonView:RadRibbonButton.Style>
                    </telerikRibbonView:RadRibbonButton>
                    <telerikRibbonView:RadRibbonButton x:Name="ScrollDownButton"
                            Padding="0"
                            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"
                            Margin="-1 0 -1 0">
                        <TextBlock x:Name="ArrowDown"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Text="{StaticResource GlyphArrow60Down}"
                                FontSize="12"
                                Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                FontFamily="{StaticResource TelerikWebUI}"/>
                        <telerikRibbonView:RadRibbonButton.Style>
                            <Style TargetType="telerikRibbonView:RadRibbonButton" BasedOn="{StaticResource RadRibbonButtonStyle}">
                                <Style.Triggers>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </telerikRibbonView:RadRibbonButton.Style>
                    </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">
                        <TextBlock x:Name="ArrowOverflow"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Text="{StaticResource GlyphArrowOverflowDown}"
                                FontSize="16"
                                Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                FontFamily="{StaticResource TelerikWebUI}"/>
                        <telerikRibbonView:RadRibbonDropDownButton.Style>
                            <Style TargetType="telerikRibbonView:RadRibbonDropDownButton" BasedOn="{StaticResource RadRibbonDropDownButtonStyle}">
                                <Style.Triggers>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </telerikRibbonView:RadRibbonDropDownButton.Style>
                    </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"
                                Margin="0 0 -1 -2"
                                BorderThickness="0 0 0 1"
                                Height="{TemplateBinding PopupViewportHeight}"
                                VerticalScrollBarVisibility="Visible">
                            <ContentPresenter x:Name="PopupHost" Width="{TemplateBinding PopupViewportWidth}"/>
                        </ScrollViewer>
                        <ItemsControl
                                HorizontalContentAlignment="Stretch"
                                BorderThickness="0"
                                Margin="0 2 0 0"
                                Grid.Row="1"
                                ItemsSource="{TemplateBinding PopupMenuItems}"
                                Foreground="{TemplateBinding Foreground}"/>
                    </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="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource 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="ViewportWidth" Value="440"/>
        <Setter Property="PopupViewportHeight" Value="{x:Static sys:Double.NaN}"/>
        <Setter Property="PopupViewportWidth" Value="440"/>
        <Setter Property="ItemWidth" Value="72"/>
        <Setter Property="ItemHeight" Value="58"/>
        <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="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <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="Padding" Value="0 0 3 0"/>
        <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="0"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource 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">
        <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
            <Grid Background="Transparent" Margin="{TemplateBinding Padding}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid x:Name="Tray" Grid.Row="1" Margin="0 1 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <ContentControl
                            Content="{TemplateBinding Header}"
                            Opacity="0.5"
                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            IsTabStop="False"
                            Foreground="{TemplateBinding Foreground}"
                            Margin="3 0"
                            ContentStringFormat="{TemplateBinding HeaderStringFormat}"/>
                    <telerikRibbonView:RadRibbonButton
                            MinHeight="0"
                            MinWidth="0"
                            Visibility="{TemplateBinding DialogLauncherVisibility}"
                            x:Name="DialogLauncher"
                            Width="14"
                            Height="14"
                            Grid.Column="1"
                            IsAutoSize="False"
                            Padding="0"
                            TabIndex="1"
                            IsTabStop="False"
                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"
                            Command="{TemplateBinding DialogLauncherCommand}"
                            CommandParameter="{TemplateBinding DialogLauncherCommandParameter}"
                            CommandTarget="{TemplateBinding DialogLauncherCommandTarget}">
                        <telerikRibbonView:RadRibbonButton.Content>
                            <TextBlock
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Text="{StaticResource GlyphLaunch}"
                                    FontSize="12"
                                    Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                    FontFamily="{StaticResource TelerikWebUI}"/>
                        </telerikRibbonView:RadRibbonButton.Content>
                    </telerikRibbonView:RadRibbonButton>
                </Grid>
                <ContentPresenter/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="GroupChromeStyle" TargetType="telerikRibbonViewPrimitives:GroupChrome">
        <Setter Property="Template" Value="{StaticResource GroupChromeTemplate}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="Padding" Value="4 4 4 2"/>
        <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="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Padding" Value="11 4 5 4"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <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="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="KeyboardNavigationVisual" To="1"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="BorderVisual"
                    Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    Opacity="0"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    CornerRadius="{TemplateBinding CornerRadius}"/>
            <Grid Margin="{TemplateBinding Padding}" x:Name="ContentGrid" VerticalAlignment="Center">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <ContentPresenter x:Name="ContentPresenter"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        RecognizesAccessKey="True"/>
                <Border x:Name="Image"
                        Margin="3"
                        Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                        BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}"
                        BorderThickness="1"
                        Width="32"
                        Height="32">
                    <Image VerticalAlignment="Center" HorizontalAlignment="Center" Width="16" Height="16" Source="{TemplateBinding SmallImage}" Stretch="None"/>
                </Border>
                <TextBlock Name="textRow1" Grid.Row="1" Text="{TemplateBinding TextRow1}" TextAlignment="Center" Foreground="{TemplateBinding Foreground}"/>
                <StackPanel Name="DropDownPanel" Grid.Row="2" HorizontalAlignment="Center" Orientation="Horizontal">
                    <TextBlock Name="textRow2" Text="{TemplateBinding TextRow2}" Foreground="{TemplateBinding Foreground}"/>
                    <TextBlock x:Name="DropDownIndicator"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            VerticalAlignment="Top"
                            Text="{StaticResource GlyphArrow60Down}"
                            FontSize="12"
                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                            FontFamily="{StaticResource TelerikWebUI}"
                            Margin="2"
                            HorizontalAlignment="Center"/>
                </StackPanel>
            </Grid>
            <Popup x:Name="DropDownPopup"
                    AllowsTransparency="True"
                    StaysOpen="False"
                    Focusable="False"
                    VerticalOffset="2"
                    Placement="Bottom"
                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                <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="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"
                        BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}"
                        BorderThickness="1 1 0 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>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="DropDownIndicator" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="ContentPresenter" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow1" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="textRow2" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsOpen" Value="True">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="DropDownButtonPosition" Value="Right">
                <Setter TargetName="DropDownPanel" Property="Grid.Column" Value="2"/>
                <Setter TargetName="DropDownPanel" Property="Grid.RowSpan" Value="3"/>
                <Setter TargetName="DropDownPanel" Property="Grid.Row" Value="0"/>
                <Setter TargetName="DropDownPanel" Property="Margin" Value="2 0 0 0"/>
                <Setter TargetName="textRow1" Property="Grid.RowSpan" Value="2"/>
                <Setter TargetName="Image" Property="Grid.RowSpan" Value="2"/>
                <Setter TargetName="ContentPresenter" Property="Grid.RowSpan" Value="2"/>
                <Setter TargetName="textRow2" Property="Visibility" Value="Collapsed"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="CornerRadius" Value="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="SeparatorStyle" TargetType="telerikRibbonView:Separator">
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Width" Value="1"/>
        <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">
            <telerikRibbonViewPrimitives:GroupChrome x:Name="ExpandedChrome"
                    DialogLauncherCommand="{TemplateBinding DialogLauncherCommand}"
                    DialogLauncherCommandParameter="{TemplateBinding DialogLauncherCommandParameter}"
                    DialogLauncherCommandTarget="{TemplateBinding DialogLauncherCommandTarget}"
                    Header="{TemplateBinding Header}"
                    HeaderTemplate="{TemplateBinding HeaderTemplate}"
                    DialogLauncherVisibility="{TemplateBinding DialogLauncherVisibility}"
                    IsTabStop="False"
                    HeaderStringFormat="{TemplateBinding HeaderStringFormat}">
                <ItemsPresenter Name="ItemsPresenter"/>
            </telerikRibbonViewPrimitives:GroupChrome>
            <telerikRibbonView:RadRibbonDropDownButton x:Name="CollapsedButton"
                    Visibility="Collapsed"
                    Style="{StaticResource RadRibbonGroupDropDownButtonStyle}"
                    SplitText="False"
                    SmallImage="{TemplateBinding Icon}"
                    Size="Large"
                    Text="{TemplateBinding Header}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="Variant" Value="Collapsed">
                <Setter Property="Visibility" TargetName="CollapsedButton" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadRibbonGroupStyle" TargetType="telerikRibbonView:RadRibbonGroup">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <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>
            <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>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter TargetName="ButtonBackground" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="ButtonBackground" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="textRow1" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ApplicationRibbonButton" TargetType="telerikRibbonView:RadRibbonButton">
        <Setter Property="Padding" Value="5 6"/>
        <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="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>
                <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}"/>
            <Border x:Name="isOpenIndicator" Visibility="Collapsed" Background="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
            <Grid Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="24"/>
                </Grid.ColumnDefinitions>
                <ContentControl
                        Grid.ColumnSpan="3"
                        x:Name="ContentPresenter"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"/>
                <Image x:Name="Image"/>
                <TextBlock x:Name="textRow1" Grid.Column="1" Text="{TemplateBinding Text}" TextAlignment="Left" VerticalAlignment="Center" Margin="4 0 1 0"/>
                <Grid x:Name="DropDownPanel" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2 0 0 0">
                    <TextBlock x:Name="DropDownIndicator"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Text="{StaticResource GlyphArrow60Right}"
                            FontSize="12"
                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                            FontFamily="{StaticResource TelerikWebUI}"/>
                </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}}">
                <Border x:Name="DropDownPopupBorder" Background="{x:Null}" Width="{TemplateBinding DropDownWidth}" Height="{TemplateBinding DropDownHeight}">
                    <ContentControl x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                </Border>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" TargetName="ButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter Property="BorderBrush" TargetName="ButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" TargetName="ButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter Property="BorderBrush" TargetName="ButtonBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False"/>
            <Trigger Property="IsOpen" Value="True">
                <Setter TargetName="isOpenIndicator" Property="Visibility" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ApplicationRibbonDropDownButton" TargetType="telerikRibbonView:RadRibbonDropDownButton">
        <Setter Property="Padding" Value="5 6"/>
        <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="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}"/>
                <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="{TemplateBinding Padding}"/>
                <Grid x:Name="DropDownPanel" Grid.Column="2" Width="22" IsHitTestVisible="False">
                    <TextBlock x:Name="DropDownIndicator"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            IsHitTestVisible="False"
                            Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                            Text="{StaticResource GlyphArrow60Right}"
                            FontSize="12"
                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                            FontFamily="{StaticResource TelerikWebUI}"/>
                </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}}">
                <Border x:Name="DropDownPopupBorder"
                        Background="{x:Null}"
                        BorderThickness="0"
                        MinWidth="3"
                        MinHeight="3"
                        Width="{TemplateBinding DropDownWidth}"
                        Height="{TemplateBinding DropDownHeight}">
                    <ContentControl x:Name="DropDownPopupContent" Content="{TemplateBinding DropDownContent}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                </Border>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="ButtonPart" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter TargetName="DropDownPart" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="ButtonPart" Property="IsBackgroundVisible" Value="False"/>
                <Setter TargetName="ButtonPart" Property="BorderThickness" Value="0"/>
                <Setter TargetName="DropDownPart" Property="IsBackgroundVisible" Value="False"/>
                <Setter TargetName="DropDownPart" Property="BorderThickness" Value="0"/>
            </Trigger>
            <Trigger Property="DropDownPlacement" Value="Relative">
                <Setter TargetName="DropDownPopup" Property="Placement" Value="Relative"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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 6"/>
        <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="{telerik1:Office2016Resource 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="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}" MinHeight="24"/>
                    <Rectangle x:Name="buttonRectangle" HorizontalAlignment="Left" Fill="Transparent" MinHeight="24"/>
                    <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="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <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="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <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="18"/>
        <Setter Property="MinHeight" Value="18"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="ScreenTipTemplate" TargetType="telerikRibbonView:ScreenTip">
        <Grid x:Name="RootElement">
            <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.Triggers>
            <Trigger Property="ScreenTipState" Value="TitleDescriptionImage">
                <Setter TargetName="DescriptionPresenter" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Image" Property="Visibility" Value="Visible"/>
                <Setter TargetName="RootElement" Property="Width" Value="318"/>
            </Trigger>
            <Trigger Property="ScreenTipState" Value="TitleDescription">
                <Setter TargetName="DescriptionPresenter" Property="Visibility" Value="Visible"/>
                <Setter TargetName="RootElement" Property="Width" Value="210"/>
            </Trigger>
            <Trigger Property="ScreenTipState" Value="Title">
                <Setter TargetName="RootElement" Property="Width" Value="210"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="ScreenTipStyle" TargetType="telerikRibbonView:ScreenTip">
        <Setter Property="Template" Value="{StaticResource ScreenTipTemplate}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style x:Key="RibbonScrollViewerIconStyle" TargetType="TextBlock">
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource TelerikWebUI}"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <ControlTemplate x:Key="RibbonScrollButtonTemplate" TargetType="RepeatButton">
        <Grid>
            <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <TextBlock x:Name="ArrowLeft" Style="{StaticResource RibbonScrollViewerIconStyle}" Text="{StaticResource GlyphArrow60Left}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RibbonScrollButtonStyle" TargetType="RepeatButton">
        <Setter Property="Template" Value="{StaticResource RibbonScrollButtonTemplate}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Width" Value="14"/>
        <Setter Property="Interval" Value="50"/>
    </Style>
    <ControlTemplate x:Key="RibbonScrollViewerTemplate" TargetType="telerikRibbonViewPrimitives:RibbonScrollViewer">
        <Grid>
            <ContentPresenter x:Name="Content" Margin="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="ButtonStates">
                    <VisualState x:Name="ButtonNormal"/>
                    <VisualState x:Name="ButtonMouseLeave"/>
                    <VisualState x:Name="ButtonMouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalVisual" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="TabItemStates">
                    <VisualState x:Name="TabItemUnSelected"/>
                    <VisualState x:Name="TabItemSelected">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalVisual" Storyboard.TargetProperty="Background" Duration="0">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="TabItemMouseOver"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Name="NormalVisual" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="0"/>
            <Border Name="SelectedVisual" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="0"/>
            <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}"
                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"
                        ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                        SnapsToDevicePixels="True"/>
            </StackPanel>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="NormalVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="ContentPanel" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="HeaderForeground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Margin" Value="0 0 0 1"/>
        <Setter Property="MinWidth" Value="5"/>
        <Setter Property="MinHeight" Value="5"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <ControlTemplate x:Key="TabControlTemplate" TargetType="telerikNavigation:RadTabControl">
        <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" Padding="-1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="1">
                    <Border x:Name="HeaderBackground"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding HeaderBackground}"
                            Visibility="{TemplateBinding BackgroundVisibility}"/>
                    <ItemsPresenter x:Name="ItemsPresenter"/>
                </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>
    <ControlTemplate x:Key="BackstageCloseButtonTemplate" TargetType="telerik:RadRibbonButton">
        <Grid x:Name="Root" Background="Transparent">
            <Ellipse x:Name="NormalVisual"
                    Width="32"
                    Height="32"
                    StrokeThickness="{TemplateBinding BorderThickness}"
                    Stroke="{TemplateBinding BorderBrush}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Fill="Transparent"/>
            <TextBlock
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Text="{StaticResource GlyphArrowChevronLeft}"
                    FontSize="16"
                    Foreground="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"
                    FontFamily="{StaticResource TelerikWebUI}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="Root" Property="Opacity" Value="0.5"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="Root" Property="Opacity" Value="0.5"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Root" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="BackstageCloseButtonStyle" TargetType="telerik:RadRibbonButton">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource BackstageCloseButtonTemplate}"/>
        <Setter Property="BorderBrush" Value="White"/>
        <Setter Property="Margin" Value="24 14 0 14"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Width" Value="32"/>
        <Setter Property="Height" Value="32"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="shell:WindowChrome.IsHitTestVisibleInChrome" Value="True"/>
    </Style>
    <ControlTemplate x:Key="TabControlTemplate2013" TargetType="telerikNavigation:RadTabControl">
        <ScrollViewer
                HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                BorderThickness="0"
                Padding="0"
                Background="{TemplateBinding Background}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Border x:Name="HeaderBackground"
                            Grid.RowSpan="2"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding HeaderBackground}"
                            Visibility="{TemplateBinding BackgroundVisibility}"/>
                    <telerikRibbonView:RadRibbonButton Style="{StaticResource BackstageCloseButtonStyle}" Command="{x:Static telerik:RibbonCommands.CloseBackstage}"/>
                    <ItemsPresenter x:Name="ItemsPresenter" Grid.Row="1"/>
                </Grid>
                <Grid x:Name="ContentBorder" Grid.Column="1" Grid.Row="1">
                    <Grid 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>
            </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>
                        <ContentPresenter x:Name="ContentPanel" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" Margin="20 5 0 5" VerticalAlignment="Center"/>
                        <Rectangle Height="1" Margin="10 0 10 10" Fill="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="ContentPanel" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </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="Margin" Value="0 1"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
        <Setter Property="HeaderBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource 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="Padding" Value="0 28 0 0"/>
        <Setter Property="BackstagePosition" Value="Office2013"/>
        <Setter Property="Template" Value="{StaticResource TabControlTemplate2013}"/>
        <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="ContextualGroupStates">
                    <VisualState x:Name="DefaultContextualGroupTab"/>
                    <VisualState x:Name="IsSingleTabInContextualGroup">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderVisual" 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="BorderVisual" 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" 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 x:Name="BorderVisual"
                        CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusTop}"
                        Background="{TemplateBinding Background}"
                        BorderThickness="{TemplateBinding BorderThickness}"/>
                <Border x:Name="KeyboardNavigationVisual" Opacity="0" Background="{telerik1:Office2016Resource ResourceKey=MainBrush}">
                    <Border Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}" 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}"
                        ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                        ContentStringFormat="{TemplateBinding HeaderStringFormat}"/>
            </Grid>
            <Grid x:Name="ContentPanel" Width="0" Height="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Border
                        Name="OuterBorder"
                        Grid.ColumnSpan="2"
                        Background="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"
                        BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                <telerikRibbonViewPrimitives:RibbonScrollViewer x:Name="TabItemsScrollViewer">
                    <ItemsPresenter HorizontalAlignment="Left"/>
                </telerikRibbonViewPrimitives:RibbonScrollViewer>
                <telerikRibbonView:RadRibbonToggleButton x:Name="MinimizeButton"
                        Grid.Column="1"
                        Style="{Binding MinimizeButtonStyle, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadRibbonView}}}"
                        VerticalAlignment="Bottom"
                        Margin="1"
                        IsEnabled="{Binding IsMinimizable, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadRibbonView}}}"
                        IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadRibbonView}}, Path=IsMinimized, Mode=TwoWay}"/>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="HeaderElement" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
                <Setter TargetName="HeaderElement" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
            </Trigger>
            <Trigger Property="IsContextualTabVisible" Value="False">
                <Setter Property="Visibility" TargetName="HeaderPanel" Value="Collapsed"/>
            </Trigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, Path=IsHostedInRibbonWindow}" Value="True">
                <Setter TargetName="OuterBorder" Property="BorderThickness" Value="0 0 0 1"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, Path=IsHostedInRibbonWindow}" Value="False">
                <Setter TargetName="OuterBorder" Property="BorderThickness" Value="1 0 0 1"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadRibbonTabStyle" TargetType="telerikRibbonView:RadRibbonTab">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Padding" Value="13 3"/>
        <Setter Property="BorderThickness" Value="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 ItemSpacing="0"/>
                </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="ContextualGroupStates">
                    <VisualState x:Name="DefaultContextualGroupTab"/>
                    <VisualState x:Name="IsSingleTabInContextualGroup">
                        <Storyboard>
                            <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_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 x:Name="BorderVisual" Background="{TemplateBinding Background}" OpacityMask="#4C000000"/>
                <Border x:Name="BackgroundBorder"
                        Background="{TemplateBinding Background}"
                        OpacityMask="#00000000"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"/>
                <Border x:Name="Background_Selected"
                        Visibility="Collapsed"
                        BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}"
                        Background="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"
                        BorderThickness="1 1 1 0"/>
                <Border x:Name="KeyboardNavigationVisual"
                        BorderThickness="1 1 1 0"
                        Opacity="0"
                        Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                        BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}">
                    <Border Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}" 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" Background="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}" BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}">
                    <telerikRibbonViewPrimitives:RibbonScrollViewer x:Name="TabItemsScrollViewer">
                        <ItemsPresenter HorizontalAlignment="Left"/>
                    </telerikRibbonViewPrimitives:RibbonScrollViewer>
                </Border>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter TargetName="Background_Selected" Property="Visibility" Value="Visible"/>
                <Setter TargetName="HeaderElement" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="HeaderElement" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsContextualTabVisible" Value="False">
                <Setter Property="Visibility" TargetName="HeaderPanel" Value="Collapsed"/>
            </Trigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, Path=IsHostedInRibbonWindow}" Value="True">
                <Setter TargetName="OuterBorder" Property="BorderThickness" Value="0 0 0 1"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, Path=IsHostedInRibbonWindow}" Value="False">
                <Setter TargetName="OuterBorder" Property="BorderThickness" Value="1 0 0 1"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </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="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="13 4"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerikRibbonViewPrimitives:RibbonGroupsPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource ContextualTabsTemplate}"/>
    </Style>
    <ControlTemplate x:Key="ContextualGroupsTemplate" TargetType="telerikRibbonView:RadRibbonContextualGroup">
        <Grid x:Name="HeaderGrid" Background="Transparent" Margin="0">
            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding Color}"/>
            <Border Background="{TemplateBinding Color}" OpacityMask="#4C000000"/>
            <ContentControl
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    IsTabStop="False"
                    Content="{TemplateBinding Header}"
                    FontSize="{TemplateBinding FontSize}"
                    HorizontalAlignment="{TemplateBinding HeaderAlignment}"
                    Foreground="{TemplateBinding Foreground}"
                    Margin="{TemplateBinding Padding}"
                    ContentTemplate="{TemplateBinding HeaderTemplate}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ContextualGroupsStyle" TargetType="telerikRibbonView:RadRibbonContextualGroup">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Margin" Value="0 0 3 0"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="BorderThickness" Value="0 3 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="Template" Value="{StaticResource ContextualGroupsTemplate}"/>
    </Style>
    <ControlTemplate x:Key="OverflowMenuItemTemplate" TargetType="telerikNavigation:RadMenuItem">
        <ContentPresenter Margin="30 0 0 0" Content="{TemplateBinding Header}"/>
    </ControlTemplate>
    <Style x:Key="RadRibbonColorPickerStyle" TargetType="telerik:RadColorPicker" BasedOn="{StaticResource RadColorPickerStyle}">
        <Setter Property="MinWidth" Value="43"/>
        <Setter Property="Height" Value="22"/>
        <Setter Property="Padding" Value="4 0"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="SplitButtonStyle" Value="{StaticResource RadRibbonSplitButtonStyle}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadColorPicker">
                    <Grid x:Name="Root"
                            Width="{TemplateBinding Width}"
                            Height="{TemplateBinding Height}"
                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <telerik:RadRibbonSplitButton x:Name="SplitButton"
                                Style="{TemplateBinding SplitButtonStyle}"
                                FontWeight="Normal"
                                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}">
                            <telerik:RadRibbonSplitButton.DropDownContent>
                                <telerik: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"/>
                            </telerik:RadRibbonSplitButton.DropDownContent>
                        </telerik:RadRibbonSplitButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="QATRibbonDropDownButtonStyle" TargetType="telerikRibbonView:RadRibbonDropDownButton" BasedOn="{StaticResource RadRibbonDropDownButtonStyle}">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikRibbonView:RadRibbonDropDownButton">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="KeyboardNavigationVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Opacity="0"
                                Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Grid x:Name="ContentGrid" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                            <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}"/>
                        </Grid>
                        <Popup x:Name="DropDownPopup" VerticalOffset="1" AllowsTransparency="True" StaysOpen="False" Focusable="False" Placement="Bottom">
                            <Grid>
                                <Border x:Name="DropDownPopupBorder"
                                        CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                        BorderThickness="1"
                                        Padding="1"
                                        Margin="0"
                                        MinWidth="3"
                                        MinHeight="3"
                                        Width="{TemplateBinding DropDownWidth}"
                                        Height="{TemplateBinding DropDownHeight}"
                                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                        MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                        Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                                        BorderBrush="{telerik1:Office2016Resource 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.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="ContentPresenter" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsOpen" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <DataTrigger Binding="{Binding QuickAccessToolBarPosition, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadRibbonView}}}" Value="BelowRibbon">
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <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}" BorderThickness="1 0 1 1"/>
            </Grid>
            <Grid x:Name="AboveBackgroundGridWrapper">
                <Grid x:Name="AboveBackgroundGrid"/>
            </Grid>
            <telerikToolBar:RadToolBarPanel x:Name="PART_StripPanel" Orientation="Horizontal"/>
            <telerikRibbonView:RadRibbonDropDownButton x:Name="DropDownButton"
                    Visibility="{TemplateBinding CustomizationMenuVisibility}"
                    Style="{StaticResource QATRibbonDropDownButtonStyle}"
                    DropDownIndicatorVisibility="Collapsed"
                    IsOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsOverflowOpen, Mode=TwoWay}"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    Grid.Column="1"
                    VerticalContentAlignment="Center"
                    Width="22"
                    Height="22"
                    Padding="0">
                <ToolTipService.ToolTip>
                    <TextBlock Text="{telerik:LocalizableResource Key=RibbonViewQATCustomize}"/>
                </ToolTipService.ToolTip>
                <telerikRibbonView:RadRibbonDropDownButton.DropDownContent>
                    <StackPanel Margin="-1 -1 -1 -1">
                        <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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}">
                            <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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                        <telerikNavigation:RadMenuItem x:Name="TogglePositionMenuItem"
                                Header="{telerik:LocalizableResource Key=RibbonViewQATShowBelow}"
                                Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"
                                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="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"
                                Command="{x:Static telerikRibbonView:RibbonCommands.MinimizeRibbonCommand}"/>
                    </StackPanel>
                </telerikRibbonView:RadRibbonDropDownButton.DropDownContent>
                <TextBlock x:Name="GlyphUnpin"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Text="{StaticResource GlyphArrowOverflowDown}"
                        FontFamily="{StaticResource TelerikWebUI}"
                        FontSize="16"
                        Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"/>
            </telerikRibbonView:RadRibbonDropDownButton>
        </Grid>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, Path=IsHostedInRibbonWindow}" Value="False">
                <Setter TargetName="PART_StripPanel" Property="Margin" Value="4 0 0 0"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="QuickAccessToolBarStyle" TargetType="telerikRibbonView:QuickAccessToolBar">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <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="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <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}"
                                FontSize="{telerik1:Office2016Resource ResourceKey=FontSize}"
                                Foreground="{TemplateBinding Foreground}"
                                TextTrimming="CharacterEllipsis"/>
                        <TextBlock x:Name="Divider"
                                Text="{telerik:LocalizableResource Key=RibbonViewWindowTitleDivider}"
                                Visibility="{TemplateBinding DividerVisibility}"
                                Foreground="{TemplateBinding Foreground}"
                                FontSize="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
                        <TextBlock x:Name="ApplicationName"
                                Text="{TemplateBinding ApplicationName}"
                                Foreground="{TemplateBinding Foreground}"
                                TextTrimming="CharacterEllipsis"
                                FontSize="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
                    </telerikRibbonViewPrimitives:WindowTitlePanel>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, Path=IsHostedInRibbonWindow}" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </DataTrigger>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonView}, Path=IsHostedInRibbonWindow}" 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="White"/>
                        </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="KeyboardNavigationStates">
                    <VisualState x:Name="KeyboardUnfocused"/>
                    <VisualState x:Name="KeyboardFocused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="KeyboardNavigationVisual"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="OuterBorder"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"/>
            <Border x:Name="KeyboardNavigationVisual"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Opacity="0"
                    Background="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            <TextBlock x:Name="MinimizeButtonGlyph"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"
                    Text="{StaticResource GlyphArrowChevronUp}"
                    FontFamily="{StaticResource TelerikWebUI}"
                    FontSize="16"
                    Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" TargetName="OuterBorder" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" TargetName="OuterBorder" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="MinimizeButtonGlyph" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="True">
                <Setter TargetName="MinimizeButtonGlyph" Property="Text" Value="{StaticResource GlyphUnpin}"/>
                <Setter TargetName="RootElement" Property="telerikRibbonView:ScreenTip.Title" Value="{telerik:LocalizableResource Key=RibbonViewExpandRibbon}"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="False">
                <Setter TargetName="RootElement" Property="telerikRibbonView:ScreenTip.Title" Value="{telerik:LocalizableResource Key=RibbonViewMinimizeRibbon}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </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="MinWidth" Value="16"/>
        <Setter Property="MinHeight" Value="16"/>
        <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"/>
                <Rectangle Grid.Row="1" Grid.ColumnSpan="3" Fill="{TemplateBinding TitleBarBackground}"/>
                <telerikRibbonViewPrimitives:RibbonTitleBarPanel x:Name="RibbonTitleBarPanel" Grid.ColumnSpan="2" Visibility="{TemplateBinding TitleBarVisibility}">
                    <ContentPresenter x:Name="AboveToolBarHost" VerticalAlignment="Center" Margin="0 4 0 5" telerikRibbonViewPrimitives:RibbonTitleBarPanel.Element="QuickAccessToolBar"/>
                    <telerikRibbonViewPrimitives:WindowTitle x:Name="WindowTitle"
                            Title="{TemplateBinding Title}"
                            Margin="0 6 40 6"
                            telerikRibbonViewPrimitives:RibbonTitleBarPanel.Element="WindowTitle"
                            ApplicationName="{TemplateBinding ApplicationName}"
                            Style="{TemplateBinding WindowTitleStyle}"/>
                    <StackPanel x:Name="ContextualGroupsHeaders" Margin="1 0 0 -4" Orientation="Horizontal" telerikRibbonViewPrimitives:RibbonTitleBarPanel.Element="ContextualGroupsPanel"/>
                </telerikRibbonViewPrimitives:RibbonTitleBarPanel>
                <telerikRibbonViewPrimitives:RadRibbonApplicationDropDownButton x:Name="ApplicationButton"
                        Grid.Row="1"
                        Margin="0 4 1 0"
                        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" x:Name="TabsScrollViewer">
                    <ItemsPresenter Margin="0 4 0 0"/>
                </telerikRibbonViewPrimitives:RibbonScrollViewer>
                <StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="1">
                    <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" 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="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <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="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
        <Setter Property="TitleBarBackground" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
        <Setter Property="ContentHeight" Value="94"/>
        <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.Resources>
            <Style TargetType="telerik:RadColorPicker" BasedOn="{StaticResource RadRibbonColorPickerStyle}"/>
        </Style.Resources>
    </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}"/>
    <Style x:Key="RadRibbonWindowCloseButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FontSize" Value="16"/>
        <Setter Property="Height" Value="30"/>
        <Setter Property="Width" Value="45"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid Background="{TemplateBinding Background}">
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Border x:Name="PressedVisual" Opacity="0" BorderThickness="0" Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
                        <TextBlock
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Text="{StaticResource GlyphClose}"
                                FontSize="{TemplateBinding FontSize}"
                                Foreground="{TemplateBinding Foreground}"
                                FontFamily="{StaticResource TelerikWebUI}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=ValidationBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=ValidationBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=ValidationBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=ValidationBrush}"/>
                            <Setter TargetName="PressedVisual" Property="Opacity" Value="0.5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRibbonWindowMinimizeButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FontSize" Value="16"/>
        <Setter Property="Height" Value="30"/>
        <Setter Property="Width" Value="45"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid Background="{TemplateBinding Background}">
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <TextBlock
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Text="{StaticResource GlyphMinimize}"
                                FontSize="{TemplateBinding FontSize}"
                                Foreground="{TemplateBinding Foreground}"
                                FontFamily="{StaticResource TelerikWebUI}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRibbonWindowToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FontSize" Value="16"/>
        <Setter Property="Height" Value="30"/>
        <Setter Property="Width" Value="45"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadToggleButton">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding CornerRadius}"/>
                        <Grid x:Name="Restore" Background="Transparent" ToolTipService.ToolTip="Maximize">
                            <Grid.ToolTip>
                                <TextBlock Text="{telerik:LocalizableResource Key=RibbonWindowMaximize}"/>
                            </Grid.ToolTip>
                            <TextBlock
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Text="{StaticResource GlyphWindow}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    FontFamily="{StaticResource TelerikWebUI}"/>
                        </Grid>
                        <Grid Visibility="Collapsed" x:Name="Collapse" Background="Transparent" ToolTipService.ToolTip="Restore Down" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Grid.ToolTip>
                                <TextBlock Text="{telerik:LocalizableResource Key=RibbonWindowRestoreDown}"/>
                            </Grid.ToolTip>
                            <TextBlock
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Text="{StaticResource GlyphWindowCollapse}"
                                    FontSize="{TemplateBinding FontSize}"
                                    Foreground="{TemplateBinding Foreground}"
                                    FontFamily="{StaticResource TelerikWebUI}"/>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="Restore" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="Collapse" Property="Visibility" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonWindow" x:Key="RadRibbonWindowStyle">
        <Setter Property="TitleBarStyle" Value="{StaticResource WindowTitleStyle}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
        <Setter Property="WindowBackground" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
        <Setter Property="shell:WindowChrome.WindowChromeCornerRadius" Value="0"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikRibbonView:RadRibbonWindow">
                    <Grid Background="Transparent">
                        <Border x:Name="outerBorder"
                                Grid.ColumnSpan="3"
                                Grid.RowSpan="3"
                                Background="{TemplateBinding WindowBackground}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid x:Name="MaximizeWindowDecorator">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Border Grid.Row="0" Grid.RowSpan="3" Grid.Column="1" Background="{TemplateBinding WindowBackground}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                <Grid Grid.ColumnSpan="3" Background="{TemplateBinding Background}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <StackPanel x:Name="IconPanel" Orientation="Horizontal" HorizontalAlignment="Left" Visibility="Collapsed" VerticalAlignment="Center" Margin="4 0 0 3">
                                        <Image
                                                Name="PART_Icon"
                                                shell:WindowChrome.IsHitTestVisibleInChrome="True"
                                                Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Icon, Converter={StaticResource IconConverter}}"
                                                Width="{Binding Path=SmallIconSize.Width, Source={x:Static shell:SystemParameters2.Current}}"
                                                Height="{Binding Path=SmallIconSize.Height, Source={x:Static shell:SystemParameters2.Current}}"/>
                                        <Rectangle Width="1" Margin="4 0" Fill="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                                    </StackPanel>
                                    <telerikRibbonViewPrimitives:WindowTitle x:Name="WindowTitle"
                                            Grid.Column="1"
                                            Title="{TemplateBinding Title}"
                                            Style="{TemplateBinding TitleBarStyle}"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Margin="0 0 65 0"/>
                                </Grid>
                                <StackPanel x:Name="buttonPanel" Orientation="Horizontal" Grid.ColumnSpan="3" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                    <telerik:RadButton x:Name="minimizeButton"
                                            shell:WindowChrome.IsHitTestVisibleInChrome="True"
                                            ToolTipService.ToolTip="Minimize"
                                            Command="{x:Static shell:SystemCommands.MinimizeWindowCommand}"
                                            Style="{StaticResource RadRibbonWindowMinimizeButtonStyle}">
                                        <telerik:RadButton.ToolTip>
                                            <TextBlock Text="{telerik:LocalizableResource Key=RibbonWindowMinimize}"/>
                                        </telerik:RadButton.ToolTip>
                                    </telerik:RadButton>
                                    <telerik:RadToggleButton x:Name="maximizeButton"
                                            shell:WindowChrome.IsHitTestVisibleInChrome="True"
                                            IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=WindowState, Converter={StaticResource BooleanToWindowStateConverter}, Mode=TwoWay}"
                                            Style="{StaticResource RadRibbonWindowToggleButtonStyle}"/>
                                    <telerik:RadButton x:Name="closeButton"
                                            shell:WindowChrome.IsHitTestVisibleInChrome="True"
                                            Command="{x:Static shell:SystemCommands.CloseWindowCommand}"
                                            Style="{StaticResource RadRibbonWindowCloseButtonStyle}">
                                        <telerik:RadButton.ToolTip>
                                            <TextBlock Text="{telerik:LocalizableResource Key=RibbonWindowClose}"/>
                                        </telerik:RadButton.ToolTip>
                                    </telerik:RadButton>
                                </StackPanel>
                                <Border x:Name="PART_ClientAreaBorder" Background="White" Grid.Column="1" Grid.Row="1"/>
                                <AdornerDecorator x:Name="Adorner" Grid.Column="1" Grid.RowSpan="2">
                                    <ContentPresenter Canvas.ZIndex="0" Name="PART_RootContentPresenter"/>
                                </AdornerDecorator>
                                <ResizeGrip x:Name="WindowResizeGrip"
                                        Grid.Row="1"
                                        Grid.Column="1"
                                        shell:WindowChrome.ResizeGripDirection="BottomRight"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Bottom"
                                        Visibility="Collapsed"
                                        IsTabStop="false"/>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Window.ResizeMode" Value="CanResizeWithGrip"/>
                                <Condition Property="Window.WindowState" Value="Normal"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="WindowResizeGrip" Property="Visibility" Value="Visible"/>
                        </MultiTrigger>
                        <Trigger Property="Window.ResizeMode" Value="NoResize">
                            <Setter TargetName="minimizeButton" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="maximizeButton" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="closeButton" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="WindowState" Value="Maximized">
                            <Setter TargetName="IconPanel" Property="Margin" Value="9 2 0 3"/>
                            <Setter TargetName="Adorner" Property="Margin" Value="0"/>
                            <Setter TargetName="MaximizeWindowDecorator" Property="Margin" Value="6"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="telerik:RadRibbonWindow.IsAutoHideTaskbar" Value="true"/>
                                <Condition Property="Window.WindowState" Value="Maximized"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="MaximizeWindowDecorator" Property="Margin" Value="-7 -2 -7 -6"/>
                        </MultiTrigger>
                        <Trigger Property="IsTitleVisible" Value="False">
                            <Setter TargetName="WindowTitle" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerikRibbonView:RadRibbonWindow" BasedOn="{StaticResource RadRibbonWindowStyle}"/>
    <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/"/>
    <CornerRadius x:Key="ControlOuterBorder_CornerRadius">0</CornerRadius>
    <CornerRadius x:Key="ImageMiniToolBar_CornerRadius">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"/>
    </Style>
    <Style TargetType="telerikColorPickers:HighlightColorPicker" BasedOn="{StaticResource RadRibbonColorPickerStyle}"/>
    <Style TargetType="telerikColorPickers:FormattingColorPicker" BasedOn="{StaticResource RadRibbonColorPickerStyle}"/>
    <Style TargetType="telerikColorPickers:DropDownColorPicker">
        <Setter Property="Height" Value="26"/>
    </Style>
    <Style TargetType="telerikDialogs:ChangeEditingPermissionsDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:EditCustomDictionaryDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:FindReplaceDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:FloatingBlockPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:FontPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:ImageEditorDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:InsertCaptionDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:InsertCrossReferenceWindow" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:InsertDateTimeDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:InsertTableDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:ManageBookmarksDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:ManageStylesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:ProtectDocumentDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:RadInsertHyperlinkDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:RadInsertSymbolDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:RadParagraphPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="NumericWidth" Value="85"/>
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:SpellCheckingDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:StyleFormattingPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:TablePropertiesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:TableBordersDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:TabStopsPropertiesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:UnprotectDocumentDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:WatermarkSettingsDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:NewCaptionLabelDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:InsertTableOfContentsDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:ManageBibliographicSourcesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:NotesDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:AddNewBibliographicSourceDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:SetNumberingValueDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:ModifyMultiLevelListDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:ModifyTableStyleBanding" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:CodeFormattingDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
    </Style>
    <Style TargetType="telerikDialogs:SectionColumnsDialog" BasedOn="{StaticResource RadWindowStyle}">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
        <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:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Office2016Resource 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="ImageMiniToolBarButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="0 5"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Border x:Name="BorderVisual"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <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"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ImageMiniToolBarStyle" TargetType="telerikControlsRTBUI:ImageMiniToolBar" BasedOn="{StaticResource MiniToolbarBaseStyle}">
        <Setter Property="Width" Value="54"/>
        <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="24"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Border Background="{telerik1:Office2016Resource ResourceKey=AccentBrush}" Margin="-1"/>
                            <StackPanel Orientation="Horizontal" Width="{TemplateBinding Width}">
                                <TextBlock
                                        telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_Header"
                                        Foreground="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Margin="5 0"/>
                                <telerik:RadButton
                                        HorizontalAlignment="Right"
                                        Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CloseCommand}"
                                        Padding="0"
                                        BorderThickness="0"
                                        IsBackgroundVisible="False"
                                        Foreground="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"
                                        Width="16">
                                    <TextBlock
                                            Text="{StaticResource GlyphClose}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            FontSize="12"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"/>
                                </telerik:RadButton>
                            </StackPanel>
                            <StackPanel Grid.Row="1" UseLayoutRounding="True" Margin="0 1 0 0">
                                <telerik:RadButton x:Name="btnResize"
                                        Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShowImageEditorDialogCommand}"
                                        CommandParameter="ResizeTool"
                                        IsTabStop="False"
                                        IsBackgroundVisible="False"
                                        VerticalAlignment="Center"
                                        Focusable="False"
                                        Style="{StaticResource ImageMiniToolBarButtonStyle}">
                                    <TextBlock
                                            Text="{StaticResource GlyphImageResize}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            FontSize="16"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"/>
                                    <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"
                                        Focusable="False"
                                        Style="{StaticResource ImageMiniToolBarButtonStyle}">
                                    <TextBlock
                                            Text="{StaticResource GlyphRotate}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            FontSize="16"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"/>
                                    <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"
                                        Focusable="False"
                                        Style="{StaticResource ImageMiniToolBarButtonStyle}">
                                    <TextBlock
                                            Text="{StaticResource GlyphCrop}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            FontSize="16"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"/>
                                    <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"
                                        Focusable="False"
                                        Style="{StaticResource ImageMiniToolBarButtonStyle}">
                                    <TextBlock
                                            Text="{StaticResource GlyphBlur}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            FontSize="16"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"/>
                                    <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"
                                        Focusable="False"
                                        Style="{StaticResource ImageMiniToolBarButtonStyle}">
                                    <TextBlock
                                            Text="{StaticResource GlyphSharpen}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            FontSize="16"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"/>
                                    <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"
                                        Focusable="False"
                                        Style="{StaticResource ImageMiniToolBarButtonStyle}">
                                    <TextBlock
                                            Text="{StaticResource GlyphFlipHorizontal}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            FontSize="16"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"/>
                                    <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"
                                        Focusable="False"
                                        Style="{StaticResource ImageMiniToolBarButtonStyle}">
                                    <TextBlock
                                            Text="{StaticResource GlyphFlipVertical}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                            FontSize="16"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"/>
                                    <ToolTipService.ToolTip>
                                        <TextBlock telerik:LocalizationManager.ResourceKey="Documents_ImageMiniToolBar_FlipVertical"/>
                                    </ToolTipService.ToolTip>
                                </telerik:RadButton>
                            </StackPanel>
                        </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="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="2 3"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
    </Style>
    <Style x:Key="DialogLabelStyle" TargetType="telerikDialogs:DialogLabel" BasedOn="{StaticResource RadRichTextBoxLabelBaseStyle}">
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <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="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikDialogs:HeadingLabel">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRichTextBoxDialogFooterBaseStyle" TargetType="ContentControl">
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Office2016Resource 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="43"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikDialogs:DialogFooter">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ContentPresenter Margin="3 0"/>
                    </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}">
                        <ContentPresenter/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <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="{telerik:Office2016Resource ResourceKey=AccentBrush}"/>
                                        </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:Office2016Resource ResourceKey=ComplementaryBrush}"/>
        <Setter Property="Stroke" Value="{telerik:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="StrokeThickness" Value="1"/>
    </Style>
    <Style x:Key="PageMarginStyle" TargetType="Rectangle">
        <Setter Property="Fill" Value="{telerik:Office2016Resource ResourceKey=ComplementaryBrush}"/>
        <Setter Property="Stroke" Value="{telerik:Office2016Resource 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>
            <Path x:Name="Indent"
                    Stretch="Fill"
                    Data="{StaticResource IndentIcon}"
                    Visibility="Collapsed"
                    RenderTransformOrigin="0.5 0.5"
                    Fill="{TemplateBinding Background}"
                    Height="8"
                    Width="9"
                    Stroke="{TemplateBinding Foreground}"
                    SnapsToDevicePixels="True"/>
            <Path x:Name="FirstLineIndent"
                    Stretch="Fill"
                    Data="{StaticResource FirstLineIndentIcon}"
                    SnapsToDevicePixels="True"
                    RenderTransformOrigin="0.5 0.5"
                    Height="8"
                    Width="9"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Background}"
                    Stroke="{TemplateBinding Foreground}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            <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"
                    Data="{StaticResource LeftTabIcon}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Foreground}"
                    Stretch="Fill"
                    UseLayoutRounding="True"
                    Width="5"
                    Height="5"
                    SnapsToDevicePixels="True"/>
            <Path x:Name="RightTab"
                    Data="{StaticResource LeftTabIcon}"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Foreground}"
                    Width="5"
                    Height="5"
                    SnapsToDevicePixels="True"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    UseLayoutRounding="True"
                    Stretch="Fill"/>
            <Path x:Name="CenterTab"
                    Data="{StaticResource CenterTabIcon}"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Foreground}"
                    Width="8"
                    Height="5"
                    SnapsToDevicePixels="True"
                    Stretch="Fill"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    UseLayoutRounding="True"/>
            <Path x:Name="DecimalTab"
                    Data="{StaticResource DecimalTabIcon}"
                    Visibility="Collapsed"
                    Fill="{TemplateBinding Foreground}"
                    Width="8"
                    Height="5"
                    SnapsToDevicePixels="True"
                    Stretch="Fill"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
            <Path x:Name="BarTab"
                    Visibility="Collapsed"
                    Data="{StaticResource BarTabIcon}"
                    Fill="{TemplateBinding Foreground}"
                    UseLayoutRounding="True"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Stretch="Fill"
                    Width="2"
                    Height="5"
                    SnapsToDevicePixels="True"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="RulerThumbType" Value="LeftTabStop">
                <Setter Property="Visibility" TargetName="LeftTab" Value="Visible"/>
            </Trigger>
            <Trigger Property="RulerThumbType" Value="RightTabStop">
                <Setter Property="Visibility" TargetName="RightTab" Value="Visible"/>
            </Trigger>
            <Trigger Property="RulerThumbType" Value="CenterTabStop">
                <Setter Property="Visibility" TargetName="CenterTab" Value="Visible"/>
            </Trigger>
            <Trigger Property="RulerThumbType" Value="DecimalTabStop">
                <Setter Property="Visibility" TargetName="DecimalTab" Value="Visible"/>
            </Trigger>
            <Trigger Property="RulerThumbType" Value="Indent">
                <Setter Property="Visibility" TargetName="Indent" Value="Visible"/>
            </Trigger>
            <Trigger Property="RulerThumbType" Value="FirstLineIndent">
                <Setter Property="Visibility" TargetName="FirstLineIndent" Value="Visible"/>
            </Trigger>
            <Trigger Property="RulerThumbType" Value="LeftIndent">
                <Setter Property="Visibility" TargetName="LeftIndent" Value="Visible"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RulerThumbBaseStyle" TargetType="telerikControlsRTBUI:RulerThumb">
        <Setter Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="Margin" Value="-4 9 0 0"/>
        <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:Office2016Resource ResourceKey=MainBrush}"/>
                        <Border
                                Height="1"
                                Margin="0 1 0 0"
                                VerticalAlignment="Top"
                                Background="{telerik:Office2016Resource ResourceKey=IconBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 3 0 0"
                                VerticalAlignment="Top"
                                Background="{telerik:Office2016Resource ResourceKey=IconBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 5 0 0"
                                VerticalAlignment="Top"
                                Background="{telerik:Office2016Resource ResourceKey=IconBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                Height="1"
                                Margin="0 7 0 0"
                                VerticalAlignment="Top"
                                Background="{telerik:Office2016Resource ResourceKey=IconBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="1 0 0 0"
                                Width="1"
                                Background="{telerik:Office2016Resource ResourceKey=IconBrush}"
                                UseLayoutRounding="False"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="3 0 0 0"
                                Width="1"
                                Background="{telerik:Office2016Resource ResourceKey=IconBrush}"
                                UseLayoutRounding="True"
                                SnapsToDevicePixels="True"/>
                        <Border
                                HorizontalAlignment="Left"
                                Margin="5 0 0 0"
                                Width="1"
                                Background="{telerik:Office2016Resource ResourceKey=IconBrush}"
                                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:Office2016Resource ResourceKey=ComplementaryBrush}"/>
        <Setter Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Width" Value="10"/>
        <Setter Property="Height" Value="14"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid Background="{TemplateBinding Background}" Width="{TemplateBinding Width}" Margin="-5 1 0 1">
                        <Border BorderBrush="{telerik:Office2016Resource 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:Office2016Resource ResourceKey=IconBrush}"/>
        <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:Office2016Resource ResourceKey=AlternativeBrush}"
                                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:Office2016Resource ResourceKey=MainBrush}"
                                            Canvas.Left="0"
                                            Canvas.Top="0"
                                            Height="14"
                                            Stroke="{telerik:Office2016Resource ResourceKey=BasicBrush}"
                                            StrokeThickness="1"/>
                                    <Rectangle x:Name="PART_RightMarginRectangle" Style="{StaticResource PageMarginStyle}" Height="14"/>
                                </Canvas>
                                <Canvas x:Name="PART_HorizontalMarkersContainer"/>
                                <Canvas x:Name="PART_HorizontalThumbBackgroundsContainer"/>
                                <Canvas x:Name="PART_HorizontalThumbsContainer" Canvas.ZIndex="10">
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_ParagraphFirstLineIndent"
                                            RulerThumbType="FirstLineIndent"
                                            Canvas.ZIndex="10"
                                            ToolTipText="First Line Indent"
                                            Style="{StaticResource FirstLineIndentThumbStyle}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_ParagraphHangingIndent" RulerThumbType="Indent" Canvas.ZIndex="10" ToolTipText="Hanging Indent" Style="{StaticResource HangingIndentThumbStyle}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_ParagraphLeftIndent" RulerThumbType="LeftIndent" Canvas.ZIndex="10" ToolTipText="Left Indent" Style="{StaticResource LeftIndentThumbStyle}"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_ParagraphRightIndent" Canvas.ZIndex="10" ToolTipText="Right Indent" Style="{StaticResource RightIndentThumbStyle}" RulerThumbType="Indent"/>
                                    <telerikControlsRTBUI:RulerThumb x:Name="PART_TabStopMarker" Canvas.ZIndex="0" Foreground="{telerik:Office2016Resource 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:Office2016Resource ResourceKey=AlternativeBrush}"
                                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:Office2016Resource ResourceKey=MainBrush}"
                                            Canvas.Left="0"
                                            Canvas.Top="0"
                                            Width="14"
                                            Stroke="{telerik:Office2016Resource ResourceKey=BasicBrush}"
                                            StrokeThickness="1"/>
                                    <Rectangle x:Name="PART_BottomMarginRectangle" Style="{StaticResource PageMarginStyle}" Width="14"/>
                                </Canvas>
                                <Canvas x:Name="PART_VerticalMarkersContainer"/>
                                <Canvas x:Name="PART_VerticalThumbBackgroundsContainer"/>
                                <Canvas x:Name="PART_VerticalThumbsContainer"/>
                            </Grid>
                        </Canvas>
                        <Border
                                Background="{telerik:Office2016Resource ResourceKey=AlternativeBrush}"
                                BorderBrush="{telerik:Office2016Resource ResourceKey=BasicBrush}"
                                BorderThickness="1"
                                Margin="-1 -1 0 -1">
                            <Border x:Name="PART_TabStops"
                                    Background="{telerik:Office2016Resource ResourceKey=MainBrush}"
                                    BorderBrush="{telerik:Office2016Resource ResourceKey=BasicBrush}"
                                    BorderThickness="1"
                                    Width="14"
                                    Height="14">
                                <telerikControlsRTBUI:RulerThumb x:Name="PART_RulerThumbTypeSelector" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0" IsHitTestVisible="False"/>
                            </Border>
                        </Border>
                        <Line x:Name="PART_MarkLine"
                                Grid.Row="1"
                                Grid.Column="1"
                                Stroke="{telerik:Office2016Resource ResourceKey=IconBrush}"
                                StrokeThickness="1"
                                StrokeDashArray="1 1 1 1 1 3"
                                Margin="0 2 0 0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="LayoutModeSelectorStyle" TargetType="telerikControlsRTBUIStatusBar:LayoutModeSelector">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikControlsRTBUIStatusBar:LayoutModeSelector">
                    <StackPanel x:Name="LayoutRoot" Orientation="Horizontal" UseLayoutRounding="True">
                        <telerik:RadToggleButton x:Name="btnPrintLayout" IsTabStop="False" IsBackgroundVisible="False" VerticalAlignment="Center" Width="26" Height="26" Focusable="False">
                            <TextBlock
                                    Text="{StaticResource GlyphAlignLeft}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton x:Name="btnWebLayout" Margin="4 0 0 0" IsTabStop="False" IsBackgroundVisible="False" VerticalAlignment="Center" Width="26" Height="26" Focusable="False">
                            <TextBlock
                                    Text="{StaticResource GlyphGlobe}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"/>
                        </telerik:RadToggleButton>
                    </StackPanel>
                </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" 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="70"/>
                            <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" Width="20" Height="20" BorderThickness="0" Padding="0" Margin="6 0">
                            <TextBlock
                                    Text="{StaticResource GlyphMinus}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"/>
                        </telerik:RadButton>
                        <telerikControlsRTBUIStatusBar:NonLinearSlider x:Name="sliderZoom" VerticalAlignment="Center" Grid.Column="3"/>
                        <telerik:RadButton Grid.Column="4" x:Name="buttonZoomIn" Width="20" Height="20" BorderThickness="0" Padding="0" Margin="6 0 0 0">
                            <TextBlock
                                    Text="{StaticResource GlyphPlus}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    Foreground="{Binding (TextElement.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                                    FontSize="16"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"/>
                        </telerik:RadButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRichTextBoxStatusBarStyle" TargetType="telerikControlsRTBUI:RadRichTextBoxStatusBar">
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <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="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <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="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="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                                        </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}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Margin="1 0"/>
                        <Border x:Name="CheckedBorder"
                                Background="{telerik:Office2016Resource ResourceKey=BasicBrush}"
                                BorderBrush="{telerik:Office2016Resource 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>
