<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: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:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
        xmlns:telerikMaskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"
        xmlns:calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input"
        xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:localization="clr-namespace:Telerik.Windows.Controls.Localization;assembly=Telerik.Windows.Controls"
        xmlns:colorPaletteConverters="clr-namespace:Telerik.Windows.Controls.ColorPicker.Converters;assembly=Telerik.Windows.Controls.Input"
        xmlns:colorPickerConverters="clr-namespace:Telerik.Windows.Controls.ColorEditor.Converters;assembly=Telerik.Windows.Controls.Input"
        xmlns:colorMode="clr-namespace:Telerik.Windows.Controls.ColorEditor.Mode;assembly=Telerik.Windows.Controls.Input"
        xmlns:pad="clr-namespace:Telerik.Windows.Controls.ColorEditor.Pad;assembly=Telerik.Windows.Controls.Input"
        xmlns:effects="clr-namespace:Telerik.Windows.Controls.ColorEditor.Effects;assembly=Telerik.Windows.Controls.Input"
        xmlns:colorEditorHelpers="clr-namespace:Telerik.Windows.Controls.ColorEditor.Helpers;assembly=Telerik.Windows.Controls.Input"
        xmlns:telerikRating="clr-namespace:Telerik.Windows.Controls.Rating;assembly=Telerik.Windows.Controls.Input">
    <ResourceDictionary.MergedDictionaries>
        <telerik:Office2016ResourceDictionary/>
    </ResourceDictionary.MergedDictionaries>
    <telerik1:ColorToBrushConverter x:Key="converter"/>
    <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <telerik1:InvertedBooleanConverter x:Key="InvertedBooleanConverter"/>
    <Geometry x:Key="ArrowTopRight8x8">M0,0 L8,0 8,8 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="GlyphGrid"></sys:String>
    <sys:String x:Key="GlyphClock"></sys:String>
    <sys:String x:Key="GlyphCalendar"></sys:String>
    <sys:String x:Key="GlyphClose"></sys:String>
    <sys:String x:Key="GlyphCalculator"></sys:String>
    <sys:String x:Key="GlyphStarOutline"></sys:String>
    <sys:String x:Key="GlyphStar"></sys:String>
    <sys:String x:Key="GlyphForegroundColor"></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>
    <telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
    <telerikMaskedInput:HorizontalContentAlignmentToTextAlignmentConverter x:Key="HorizontalContentAlignmentToTextAlignmentConverter"/>
    <telerikMaskedInput:HorizontalContentAlignmentToTextAlignmentConverter x:Key="conv"/>
    <telerik:BooleanToVisibilityConverter x:Key="boolToVisConverter"/>
    <telerik:NullToVisibilityConverter x:Key="NullToVisibilityConverterInstance"/>
    <telerik:UppercaseConverter x:Key="TextToUpperCaseConverter"/>
    <Thickness x:Key="CalendarButtonMargin">1</Thickness>
    <Thickness x:Key="CalendarViewBorderThickness">1 0 1 1</Thickness>
    <Thickness x:Key="CalendarViewHeaderPadding">5</Thickness>
    <Thickness x:Key="CalendarViewMargin">-1 -1 0 0</Thickness>
    <Thickness x:Key="CalendarViewHeaderMargin">0</Thickness>
    <Thickness x:Key="CalendarItemsMargin">1 1 1 1</Thickness>
    <sys:Int32 x:Key="CalendarWeekHeaderVerticalOuterBorderZIndex">0</sys:Int32>
    <Thickness x:Key="CalendarWeekHeaderVerticalOuterBorderMargin">0 1 -2 0</Thickness>
    <sys:Int32 x:Key="CalendarWeekHeaderVerticalBackgroundZIndex">2</sys:Int32>
    <sys:Int32 x:Key="CalendarWeekHeaderHorizontalBackgroundZIndex">1</sys:Int32>
    <TextDecorationCollection x:Key="HeaderButtonTextDecoration">Underline</TextDecorationCollection>
    <FontWeight x:Key="HeaderTextFontWeight">Normal</FontWeight>
    <Thickness x:Key="CalendarHeaderPadding">0</Thickness>
    <Thickness x:Key="CalendarTransitionPanelMargin">1 1 1 1</Thickness>
    <Thickness x:Key="ClockItemPadding">5 2 5 2</Thickness>
    <Thickness x:Key="ClockItemsPresenterMargin">2 1 2 2</Thickness>
    <Thickness x:Key="ClockItemsMargin">1 1 1 1</Thickness>
    <sys:Double x:Key="ColorEditor_Label_MinWidth">15</sys:Double>
    <sys:Double x:Key="ColorEditor_Input_MinWidth">57</sys:Double>
    <Thickness x:Key="ColorEditor_Input_Margin">0 2 10 3</Thickness>
    <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 x:Key="CalculatorHistoryDisplay_Style" TargetType="TextBox">
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="4 0 -2 0"/>
        <Setter Property="TextAlignment" Value="Right"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="IsEnabled" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <ScrollViewer x:Name="PART_ContentHost"
                            BorderThickness="0"
                            Background="Transparent"
                            BorderBrush="Transparent"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            ScrollViewer.VerticalScrollBarVisibility="Disabled"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CalculatorDisplayValue_Style" TargetType="TextBox">
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="TextAlignment" Value="Right"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="IsReadOnly" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <ContentPresenter x:Name="Content"
                            Content="{TemplateBinding Text}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                    <ControlTemplate.Triggers>
                        <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="CalculatorButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSizeL}"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="MinWidth" Value="36"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>
                        <Border
                                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>
                    </Grid>
                    <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 TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CalculatorMemoryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSizeL}"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="MinWidth" Value="36"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadButton">
                    <Grid>
                        <Border
                                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>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" 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 Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadCalculatorTemplate" TargetType="controls:RadCalculator">
        <Grid Background="Transparent" SnapsToDevicePixels="True">
            <Border
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                    SnapsToDevicePixels="True">
                <Grid x:Name="Root" Margin="{TemplateBinding Padding}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Border MinHeight="58" Background="{telerik1:Office2016Resource ResourceKey=MainBrush}" BorderBrush="{x:Null}" Margin="5" Padding="0" SnapsToDevicePixels="True">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBox x:Name="DisplayTextBox"
                                    Grid.Row="1"
                                    Grid.ColumnSpan="2"
                                    Text="{Binding DisplayedValue, RelativeSource={RelativeSource TemplatedParent}}"
                                    Style="{StaticResource CalculatorDisplayValue_Style}"
                                    Foreground="{TemplateBinding Foreground}"/>
                            <TextBlock x:Name="MemoryIndicatorTextBox"
                                    Text="M"
                                    Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsMemoryUpdated, Converter={StaticResource BooleanToVisibilityConverter}}"
                                    VerticalAlignment="Top"
                                    FontSize="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
                            <TextBox x:Name="HistoryTextBox"
                                    Grid.Column="1"
                                    Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=History, Mode=OneWay}"
                                    Style="{StaticResource CalculatorHistoryDisplay_Style}"
                                    Foreground="{TemplateBinding Foreground}"/>
                        </Grid>
                    </Border>
                    <Grid x:Name="btnContainer" Grid.Row="1">
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="row"/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="BackgroundBorderVisual"
                                Background="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"
                                Grid.Column="0"
                                Grid.Row="1"
                                Grid.ColumnSpan="5"
                                Grid.RowSpan="5"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusBottom}"/>
                        <telerik:RadButton x:Name="Mc_Button" Content="MC" Grid.Column="0" Command="{x:Static controls:RadCalculatorCommands.MemoryClear}" Style="{StaticResource CalculatorMemoryButtonStyle}"/>
                        <telerik:RadButton x:Name="Mr_Button"
                                Content="MR"
                                Grid.Column="1"
                                Command="{x:Static controls:RadCalculatorCommands.MemoryRecall}"
                                Style="{StaticResource CalculatorMemoryButtonStyle}"/>
                        <telerik:RadButton x:Name="Ms_Button" Content="MS" Grid.Column="2" Command="{x:Static controls:RadCalculatorCommands.MemoryStore}" Style="{StaticResource CalculatorMemoryButtonStyle}"/>
                        <telerik:RadButton x:Name="Mplus_Button"
                                Content="M+"
                                Grid.Column="3"
                                Command="{x:Static controls:RadCalculatorCommands.MemoryPlus}"
                                Style="{StaticResource CalculatorMemoryButtonStyle}"/>
                        <telerik:RadButton x:Name="Mminus_Button"
                                Content="M-"
                                Grid.Column="4"
                                Command="{x:Static controls:RadCalculatorCommands.MemoryMinus}"
                                Style="{StaticResource CalculatorMemoryButtonStyle}"/>
                        <telerik:RadButton x:Name="Delete_Button" Content="←" Grid.Row="1" Grid.Column="0" Command="{x:Static controls:RadCalculatorCommands.Delete}"/>
                        <telerik:RadButton x:Name="ClearInput_Button" Content="CE" Grid.Row="1" Grid.Column="1" Command="{x:Static controls:RadCalculatorCommands.ClearInput}"/>
                        <telerik:RadButton x:Name="ClearEverything_Button" Content="C" Grid.Row="1" Grid.Column="2" Command="{x:Static controls:RadCalculatorCommands.ClearEverything}"/>
                        <telerik:RadButton x:Name="Negate_Button"
                                Content="±"
                                Grid.Row="1"
                                Grid.Column="3"
                                Command="{x:Static controls:RadCalculatorCommands.ExecuteUnaryOperation}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Negate}"/>
                        <telerik:RadButton x:Name="SquareRoot_Button"
                                Content="√"
                                Grid.Row="1"
                                Grid.Column="4"
                                Command="{x:Static controls:RadCalculatorCommands.ExecuteUnaryOperation}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.SquareRoot}"/>
                        <telerik:RadButton x:Name="input7_Button" Content="7" Grid.Row="2" Grid.Column="0" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="7"/>
                        <telerik:RadButton x:Name="input8_Button" Content="8" Grid.Row="2" Grid.Column="1" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="8"/>
                        <telerik:RadButton x:Name="input9_Button" Content="9" Grid.Row="2" Grid.Column="2" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="9"/>
                        <telerik:RadButton x:Name="Divide_Button"
                                Content="/"
                                Grid.Row="2"
                                Grid.Column="3"
                                Command="{x:Static controls:RadCalculatorCommands.AddPendingBinaryOperation}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Divide}"/>
                        <telerik:RadButton x:Name="Percent_Button" Content="%" Grid.Row="2" Grid.Column="4" Command="{x:Static controls:RadCalculatorCommands.ExecutePercentOperation}"/>
                        <telerik:RadButton x:Name="input4_Button" Content="4" Grid.Row="3" Grid.Column="0" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="4"/>
                        <telerik:RadButton x:Name="input5_Button" Content="5" Grid.Row="3" Grid.Column="1" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="5"/>
                        <telerik:RadButton x:Name="input6_Button" Content="6" Grid.Row="3" Grid.Column="2" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="6"/>
                        <telerik:RadButton x:Name="Multiply_Button"
                                Content="*"
                                Grid.Row="3"
                                Grid.Column="3"
                                Command="{x:Static controls:RadCalculatorCommands.AddPendingBinaryOperation}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Multiply}"/>
                        <telerik:RadButton x:Name="Reciprocal_Button"
                                Content="1/x"
                                Grid.Row="3"
                                Grid.Column="4"
                                Command="{x:Static controls:RadCalculatorCommands.ExecuteUnaryOperation}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Reciprocal}"/>
                        <telerik:RadButton x:Name="input1_Button" Content="1" Grid.Row="4" Grid.Column="0" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="1"/>
                        <telerik:RadButton x:Name="input2_Button" Content="2" Grid.Row="4" Grid.Column="1" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="2"/>
                        <telerik:RadButton x:Name="input3_Button" Content="3" Grid.Row="4" Grid.Column="2" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" FontWeight="Bold" CommandParameter="3"/>
                        <telerik:RadButton x:Name="Substract_Button"
                                Content="-"
                                Grid.Row="4"
                                Grid.Column="3"
                                Command="{x:Static controls:RadCalculatorCommands.AddPendingBinaryOperation}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Substract}"/>
                        <telerik:RadButton x:Name="input0_Button"
                                Content="0"
                                Grid.Row="5"
                                Grid.Column="0"
                                Grid.ColumnSpan="2"
                                Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"
                                FontWeight="Bold"
                                CommandParameter="0"/>
                        <telerik:RadButton x:Name="FloatingPoint_Button"
                                Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=DecimalSeparator}"
                                Grid.Row="5"
                                Grid.Column="2"
                                Command="{x:Static controls:RadCalculatorCommands.UpdateInput}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=DecimalSeparator}"/>
                        <telerik:RadButton x:Name="Add_Button"
                                Content="+"
                                Grid.Row="5"
                                Grid.Column="3"
                                Command="{x:Static controls:RadCalculatorCommands.AddPendingBinaryOperation}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Operations.Add}"/>
                        <telerik:RadButton x:Name="Equals_Button" Content="=" Grid.Row="4" Grid.Column="4" Grid.RowSpan="2" Command="{x:Static controls:RadCalculatorCommands.ExecuteBinaryOperation}"/>
                    </Grid>
                </Grid>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="MemoryButtonsVisibility" Value="Collapsed">
                <Setter Property="Visibility" TargetName="Mc_Button" Value="Collapsed"/>
                <Setter Property="Visibility" TargetName="Mr_Button" Value="Collapsed"/>
                <Setter Property="Visibility" TargetName="Ms_Button" Value="Collapsed"/>
                <Setter Property="Visibility" TargetName="Mplus_Button" Value="Collapsed"/>
                <Setter Property="Visibility" TargetName="Mminus_Button" Value="Collapsed"/>
                <Setter Property="Height" TargetName="row" Value="0"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="MemoryIndicatorTextBox" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter Property="Opacity" TargetName="HistoryTextBox" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <DataTrigger Binding="{Binding IsEnabled, ElementName=input7_Button}" Value="False">
                <Setter TargetName="BackgroundBorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadCalculatorStyle" TargetType="controls:RadCalculator">
        <Setter Property="Template" Value="{StaticResource RadCalculatorTemplate}"/>
        <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="0"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Style.Resources>
            <Style TargetType="telerik:RadButton" BasedOn="{StaticResource CalculatorButtonStyle}"/>
            <Style TargetType="telerik:RadButton" x:Key="CalculatorMemoryButtonStyle" BasedOn="{StaticResource CalculatorMemoryButtonStyle}"/>
        </Style.Resources>
    </Style>
    <Style TargetType="controls:RadCalculator" BasedOn="{StaticResource RadCalculatorStyle}"/>
    <Style x:Key="RadWatermarkTextBoxStyle" TargetType="telerik1:RadWatermarkTextBox">
        <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="4"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="AllowDrop" Value="True"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="telerik1:CaretBrushHelper.CaretBrush" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadWatermarkTextBox">
                    <Grid x:Name="RootElement">
                        <Border x:Name="BorderVisual"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <Border x:Name="ReadOnlyVisual"
                                BorderBrush="{x:Null}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Office2016Resource ResourceKey=ReadOnlyBackgroundBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                Opacity="0"/>
                        <ScrollViewer x:Name="PART_ContentHost"
                                Background="Transparent"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                BorderThickness="0"
                                IsTabStop="False"
                                Margin="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"/>
                        <ContentControl x:Name="WatermarkVisualElement"
                                IsTabStop="False"
                                FontStyle="Italic"
                                Content="{TemplateBinding WatermarkContent}"
                                ContentTemplate="{TemplateBinding WatermarkTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                IsHitTestVisible="False"
                                Padding="{TemplateBinding Padding}"
                                Foreground="{TemplateBinding Foreground}"
                                Margin="1 0 0 0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Visibility="Hidden">
                            <ContentControl.Template>
                                <ControlTemplate TargetType="ContentControl">
                                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{x:Null}">
                                        <ContentPresenter Margin="{TemplateBinding Padding}"/>
                                    </Border>
                                </ControlTemplate>
                            </ContentControl.Template>
                        </ContentControl>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsReadOnly" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=ReadOnlyBorderBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=ReadOnlyBackgroundBrush}"/>
                            <Setter TargetName="ReadOnlyVisual" Property="Opacity" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="WatermarkVisualElement" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </Trigger>
                        <Trigger Property="IsWatermarkVisible" Value="True">
                            <Setter TargetName="WatermarkVisualElement" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsReadOnly" Value="True"/>
                                <Condition Property="IsWatermarkVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="WatermarkVisualElement" Property="Visibility" Value="Hidden"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadWatermarkTextBox" BasedOn="{StaticResource RadWatermarkTextBoxStyle}"/>
    <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="controls: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="controls: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="controls: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="controls: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 controls: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="controls:RadComboBox">
        <Setter Property="Template" Value="{StaticResource NonEditableComboBox}"/>
        <Setter Property="EditableTemplate" Value="{StaticResource EditableComboBox}"/>
        <Setter Property="NonEditableTemplate" Value="{StaticResource NonEditableComboBox}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="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="controls:RadComboBoxItem" BasedOn="{StaticResource RadComboBoxItemStyle}"/>
    <Style TargetType="controls:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle}"/>
    <ControlTemplate x:Key="RadButtonCloseControlTemplate" TargetType="telerik:RadButton">
        <Grid x:Name="LayoutRoot" Background="Transparent">
            <TextBlock x:Name="Content"
                    Text="{StaticResource GlyphClose}"
                    VerticalAlignment="Center"
                    FontFamily="{StaticResource TelerikWebUI}"
                    FontSize="16"
                    Foreground="{TemplateBinding Foreground}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="Content" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="Content" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter TargetName="Content" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadButtonCloseStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource RadButtonCloseControlTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>
    </Style>
    <Style x:Key="RadAutoCompleteBoxItemStyle" TargetType="controls:RadAutoCompleteBoxItem">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="2 2 0 0"/>
        <Setter Property="Padding" Value="3 0 2 0"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadAutoCompleteBoxItem">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <ContentPresenter x:Name="contentPresenter"
                                        Margin="{TemplateBinding Padding}"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <telerik:RadButton x:Name="RemoveItemButton"
                                        Grid.Column="1"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Center"
                                        CornerRadius="0"
                                        BorderThickness="0"
                                        CommandParameter="{Binding}"
                                        Cursor="Arrow"
                                        IsTabStop="False"
                                        Command="{x:Static telerik:RadAutoCompleteBoxCommands.RemoveItem}"
                                        Style="{StaticResource RadButtonCloseStyle}"
                                        Focusable="False"
                                        Margin="2 1 2 1"
                                        Padding="2 4 2 3"/>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <DataTemplate x:Key="WatarmarkTemplate">
        <TextBlock Text="{Binding}" Margin="0 0 4 0"/>
    </DataTemplate>
    <Style x:Key="RadAutoCompleteTextBoxStyle" BasedOn="{StaticResource RadWatermarkTextBoxStyle}" TargetType="telerik:RadWatermarkTextBox">
        <Setter Property="WatermarkTemplate" Value="{StaticResource WatarmarkTemplate}"/>
        <Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource AncestorType={x:Type controls:RadAutoCompleteBox}}}"/>
        <Setter Property="FontFamily" Value="{Binding FontFamily, RelativeSource={RelativeSource AncestorType={x:Type controls:RadAutoCompleteBox}}}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="4 2 0 0"/>
        <Setter Property="MinHeight" Value="22"/>
    </Style>
    <ControlTemplate x:Key="RadAutoCompleteBoxTemplate" TargetType="controls:RadAutoCompleteBox">
        <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Height="{TemplateBinding Height}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    BorderThickness="0"
                    Background="Transparent"
                    IsTabStop="False"
                    Padding="-1"
                    Margin="{TemplateBinding BorderThickness}"
                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                <controls:AutoCompleteBoxesItemsControl x:Name="PART_Boxes"
                        DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
                        BoxesItemTemplate="{TemplateBinding BoxesItemTemplate}"
                        BoxesItemTemplateSelector="{TemplateBinding BoxesItemTemplateSelector}"
                        BoxesItemStyle="{TemplateBinding BoxesItemStyle}"
                        BoxesItemStyleSelector="{TemplateBinding BoxesItemStyleSelector}"
                        IsTabStop="False"
                        Foreground="{TemplateBinding Foreground}"
                        Margin="{TemplateBinding Padding}">
                    <controls:AutoCompleteBoxesItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <controls:AutoCompleteBoxesWrapPanel Width="{Binding ActualWidth, ElementName=WatermarkTextBox}"/>
                        </ItemsPanelTemplate>
                    </controls:AutoCompleteBoxesItemsControl.ItemsPanel>
                </controls:AutoCompleteBoxesItemsControl>
            </ScrollViewer>
            <Popup x:Name="PART_Popup" VerticalOffset="1">
                <Grid x:Name="PopupRoot" MinWidth="{TemplateBinding MinDropDownWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
                    <telerik:RadListBox x:Name="PART_ListBox"
                            ItemsSource="{TemplateBinding FilteredItems}"
                            ItemTemplate="{TemplateBinding DropDownItemTemplate}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            UseLayoutRounding="True"/>
                    <Border
                            Background="{Binding Background, ElementName=PART_ListBox}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1"
                            CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            Width="{Binding ElementName=PART_ListBox, Path=Width}"
                            Visibility="{Binding ElementName=PART_NoResultsContentPresenter, Path=Visibility}">
                        <ContentPresenter x:Name="PART_NoResultsContentPresenter"
                                MinWidth="{TemplateBinding MinDropDownWidth}"
                                MaxHeight="{TemplateBinding MaxDropDownHeight}"
                                Content="{TemplateBinding NoResultsContent}"
                                ContentTemplate="{TemplateBinding NoResultsContentTemplate}"
                                Margin="4"
                                Visibility="Collapsed">
                            <ContentPresenter.Resources>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
                                </Style>
                            </ContentPresenter.Resources>
                        </ContentPresenter>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadAutoCompleteBoxStyle" TargetType="controls:RadAutoCompleteBox">
        <Setter Property="Template" Value="{StaticResource RadAutoCompleteBoxTemplate}"/>
        <Setter Property="TextBoxStyle" Value="{StaticResource RadAutoCompleteTextBoxStyle}"/>
        <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="0 0 2 2"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Cursor" Value="IBeam"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
    </Style>
    <Style TargetType="controls:RadAutoCompleteBoxItem" BasedOn="{StaticResource RadAutoCompleteBoxItemStyle}"/>
    <Style TargetType="controls:RadAutoCompleteBox" BasedOn="{StaticResource RadAutoCompleteBoxStyle}"/>
    <ControlTemplate x:Key="IncreaseRepeatButtonControlTemplate" TargetType="RepeatButton">
        <Border x:Name="BorderVisual"
                Background="{TemplateBinding Background}"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusRight}">
            <TextBlock x:Name="Icon"
                    Text="{StaticResource GlyphArrow60Up}"
                    FontFamily="{StaticResource TelerikWebUI}"
                    FontSize="12"
                    Foreground="{TemplateBinding Foreground}"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"
                    Margin="0 1 0 0"/>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Icon" 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 Property="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 Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                <Setter TargetName="Icon" Property="RenderTransform">
                    <Setter.Value>
                        <TranslateTransform Y="-1"/>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="DecreaseRepeatButtonControlTemplate" TargetType="RepeatButton">
        <Border x:Name="BorderVisual"
                Background="{TemplateBinding Background}"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusRight}">
            <TextBlock x:Name="Icon"
                    Text="{StaticResource GlyphArrow60Down}"
                    FontFamily="{StaticResource TelerikWebUI}"
                    FontSize="12"
                    Foreground="{TemplateBinding Foreground}"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"
                    Margin="0 1 0 0"/>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Icon" 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 Property="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 Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                <Setter TargetName="Icon" Property="RenderTransform">
                    <Setter.Value>
                        <TranslateTransform Y="1"/>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="IncreaseRepeatButtonStyle" TargetType="RepeatButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="MinWidth" Value="17"/>
        <Setter Property="MinHeight" Value="12"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="IsEnabled" Value="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanConverter}}"/>
        <Setter Property="Template" Value="{StaticResource IncreaseRepeatButtonControlTemplate}"/>
    </Style>
    <Style x:Key="DecreaseRepeatButtonStyle" TargetType="RepeatButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="MinWidth" Value="17"/>
        <Setter Property="MinHeight" Value="12"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="IsEnabled" Value="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanConverter}}"/>
        <Setter Property="Template" Value="{StaticResource DecreaseRepeatButtonControlTemplate}"/>
    </Style>
    <ControlTemplate x:Key="RadNumericUpDownControlTemplate" TargetType="controls:RadNumericUpDown">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.RowSpan="2"
                    Grid.ColumnSpan="2"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <Border x:Name="ReadOnlyVisual"
                    Grid.RowSpan="2"
                    Grid.ColumnSpan="2"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=ReadOnlyBorderBrush}"
                    Background="{telerik1:Office2016Resource ResourceKey=ReadOnlyBackgroundBrush}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                    Opacity="0"/>
            <TextBox x:Name="textbox"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    Grid.RowSpan="2"
                    TabIndex="{TemplateBinding TabIndex}"
                    BorderThickness="0"
                    Padding="{TemplateBinding Padding}"
                    Background="{TemplateBinding Background}"
                    Foreground="{TemplateBinding Foreground}"
                    FontSize="{TemplateBinding FontSize}"
                    FontFamily="{TemplateBinding FontFamily}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="Stretch"
                    TextAlignment="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=HorizontalContentAlignment, Converter={StaticResource HorizontalContentAlignmentToTextAlignmentConverter}}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    CaretBrush="{telerik1:Office2016Resource ResourceKey=MarkerBrush}">
                <TextBox.Template>
                    <ControlTemplate TargetType="TextBox">
                        <ScrollViewer x:Name="PART_ContentHost"
                                Padding="{TemplateBinding Padding}"
                                BorderBrush="Transparent"
                                Background="Transparent"
                                BorderThickness="0"
                                FontSize="{TemplateBinding FontSize}"
                                IsTabStop="False"
                                VerticalScrollBarVisibility="Auto"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </ControlTemplate>
                </TextBox.Template>
            </TextBox>
            <RepeatButton x:Name="increase" Grid.Row="0" Grid.Column="1" IsTabStop="{TemplateBinding AreButtonsTabStops}" Style="{StaticResource IncreaseRepeatButtonStyle}"/>
            <RepeatButton x:Name="decrease" Grid.Row="1" Grid.Column="1" IsTabStop="{TemplateBinding AreButtonsTabStops}" Style="{StaticResource DecreaseRepeatButtonStyle}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="ShowTextBox" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </MultiTrigger>
            <Trigger Property="ShowTextBox" Value="False">
                <Setter TargetName="textbox" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="increase" Property="Grid.Column" Value="0"/>
                <Setter TargetName="increase" Property="Grid.ColumnSpan" Value="2"/>
                <Setter TargetName="decrease" Property="Grid.Column" Value="0"/>
                <Setter TargetName="decrease" Property="Grid.ColumnSpan" Value="2"/>
            </Trigger>
            <Trigger Property="ShowButtons" Value="False">
                <Setter TargetName="increase" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="decrease" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="ShowTextBox" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="textbox" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
            </Trigger>
            <Trigger Property="IsReadOnly" Value="True">
                <Setter TargetName="ReadOnlyVisual" Property="Opacity" Value="1"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadNumericUpDownStyle" TargetType="controls:RadNumericUpDown">
        <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="MinHeight" Value="26"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template" Value="{StaticResource RadNumericUpDownControlTemplate}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
    </Style>
    <Style TargetType="controls:RadNumericUpDown" BasedOn="{StaticResource RadNumericUpDownStyle}"/>
    <Style x:Key="CalendarButtonStyle" TargetType="calendar:CalendarButton">
        <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="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinWidth" Value="24"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="calendar:CalendarButton">
                    <Grid x:Name="LayoutRoot" Background="Transparent">
                        <Border x:Name="BorderVisual"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Margin="{StaticResource CalendarButtonMargin}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <ContentControl x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                Foreground="{TemplateBinding Foreground}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                FontFamily="{TemplateBinding FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                IsTabStop="False"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Content}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFromCurrentView" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderThickness" Value="{telerik1:Office2016Resource ResourceKey=FocusThickness}"/>
                        </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 Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" 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}"/>
                        </Trigger>
                        <Trigger Property="ButtonType" Value="TodayDate">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=SelectedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=SelectedBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                            <Setter TargetName="Content" Property="FontWeight" Value="Bold"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsFromCurrentView" Value="False"/>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Opacity" Value="1"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="ButtonType" Value="TodayDate"/>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Content" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="ButtonType" Value="TodayDate"/>
                                <Condition Property="IsSelected" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </MultiTrigger>
                        <Trigger Property="ButtonType" Value="WeekNumber">
                            <Setter TargetName="Content" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ButtonType" Value="WeekName">
                            <Setter TargetName="Content" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="calendar:CalendarButton" BasedOn="{StaticResource CalendarButtonStyle}"/>
    <Style TargetType="calendar:CalendarView" x:Key="CalendarViewStyle">
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="{StaticResource CalendarViewBorderThickness}"/>
        <Setter Property="Padding" Value="{StaticResource CalendarViewHeaderPadding}"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="calendar:CalendarView">
                    <Grid Margin="{StaticResource CalendarViewMargin}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="BackgroundVisual" Grid.RowSpan="2" Background="{TemplateBinding Background}" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <Border x:Name="Header"
                                Visibility="{TemplateBinding HeaderVisibility}"
                                Margin="{StaticResource CalendarViewHeaderMargin}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                MinHeight="34">
                            <ContentPresenter
                                    Content="{TemplateBinding Header}"
                                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ItemsPresenter Grid.Row="1" Margin="{StaticResource CalendarItemsMargin}"/>
                        <Rectangle x:Name="MinDesiredSize" Grid.Row="1" Width="210" Height="185"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MonthViewStyle" TargetType="calendar:CalendarView">
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="{StaticResource CalendarViewBorderThickness}"/>
        <Setter Property="Padding" Value="{StaticResource CalendarViewHeaderPadding}"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="calendar:CalendarView">
                    <Grid Margin="{StaticResource CalendarViewMargin}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="BackgroundVisual" Grid.RowSpan="2" Background="{TemplateBinding Background}" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <Border x:Name="Header"
                                Visibility="{TemplateBinding HeaderVisibility}"
                                Margin="{StaticResource CalendarViewHeaderMargin}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                MinHeight="34">
                            <ContentPresenter
                                    Content="{TemplateBinding Header}"
                                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <Grid x:Name="WeekHeaders" Grid.Row="1">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="6*"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="7*"/>
                            </Grid.ColumnDefinitions>
                            <Border x:Name="VerticalOuterBorder"
                                    Grid.RowSpan="2"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalOuterBorderZIndex}"
                                    BorderThickness="0"
                                    Margin="{StaticResource CalendarWeekHeaderVerticalOuterBorderMargin}"
                                    Visibility="{Binding Path=HideColumn, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
                            <Rectangle x:Name="VerticalBackground"
                                    Grid.RowSpan="2"
                                    Fill="{TemplateBinding Background}"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderVerticalBackgroundZIndex}"
                                    Margin="0"
                                    Visibility="{Binding Path=HideColumn, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
                            <Rectangle x:Name="HorizontalBackground"
                                    Grid.ColumnSpan="2"
                                    Canvas.ZIndex="{StaticResource CalendarWeekHeaderHorizontalBackgroundZIndex}"
                                    Fill="Transparent"
                                    Margin="0"
                                    Visibility="{Binding Path=HideRow, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
                        </Grid>
                        <ItemsPresenter Grid.Row="1" Margin="{StaticResource CalendarItemsMargin}"/>
                        <Rectangle x:Name="MinDesiredSize" Grid.Row="1" Width="210" Height="185"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="calendar:CalendarView" BasedOn="{StaticResource MonthViewStyle}"/>
    <Style x:Key="MoveLeftButtonStyle" TargetType="RepeatButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Width" Value="24"/>
        <Setter Property="Height" Value="24"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Margin" Value="4 0 0 0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border x:Name="BorderVisual" Background="Transparent" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
                        <TextBlock x:Name="Icon"
                                Text="{StaticResource GlyphArrow60Left}"
                                FontFamily="{StaticResource TelerikWebUI}"
                                FontSize="16"
                                Foreground="{TemplateBinding Foreground}"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Icon" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MoveRightButtonStyle" TargetType="RepeatButton">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="MinWidth" Value="24"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="Margin" Value="0 0 4 0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border x:Name="BorderVisual" Background="Transparent" CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
                        <TextBlock x:Name="Icon"
                                Text="{StaticResource GlyphArrow60Right}"
                                FontFamily="{StaticResource TelerikWebUI}"
                                FontSize="16"
                                Foreground="{TemplateBinding Foreground}"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Icon" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CalendarHeaderButton" TargetType="Button">
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Margin" Value="5"/>
        <Setter Property="MinHeight" Value="16"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid x:Name="LayoutRoot">
                        <TextBlock x:Name="Text"
                                Text="{TemplateBinding Content, Converter={StaticResource TextToUpperCaseConverter}}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Foreground="{TemplateBinding Foreground}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Text" Property="TextDecorations" Value="{StaticResource HeaderButtonTextDecoration}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Text" Property="TextDecorations" Value="{StaticResource HeaderButtonTextDecoration}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="Text" Property="TextDecorations" Value="{StaticResource HeaderButtonTextDecoration}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="LayoutRoot" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadCalendarStyle" TargetType="controls:RadCalendar">
        <Setter Property="Columns" Value="1"/>
        <Setter Property="Rows" Value="1"/>
        <Setter Property="MonthViewStyle" Value="{StaticResource MonthViewStyle}"/>
        <Setter Property="YearViewStyle" Value="{StaticResource CalendarViewStyle}"/>
        <Setter Property="DecadeViewStyle" Value="{StaticResource CalendarViewStyle}"/>
        <Setter Property="CenturyViewStyle" Value="{StaticResource CalendarViewStyle}"/>
        <Setter Property="DayButtonStyle" Value="{StaticResource CalendarButtonStyle}"/>
        <Setter Property="MonthButtonStyle" Value="{StaticResource CalendarButtonStyle}"/>
        <Setter Property="YearButtonStyle" Value="{StaticResource CalendarButtonStyle}"/>
        <Setter Property="DecadeButtonStyle" Value="{StaticResource CalendarButtonStyle}"/>
        <Setter Property="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="10"/>
        <Setter Property="UseShortestDayNames" Value="True"/>
        <Setter Property="ViewsHeaderVisibility" Value="Collapsed"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="True"/>
        <Setter Property="TabIndex" Value="0"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadCalendar">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="BackgroundVisual"
                                Grid.RowSpan="2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <calendar:TransitionPanel x:Name="TransitionPanel" Grid.Row="1" ClipToBounds="True" Margin="{StaticResource CalendarTransitionPanelMargin}" FocusVisualStyle="{x:Null}">
                            <primitives:RadUniformGrid x:Name="MonthViews" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}"/>
                            <primitives:RadUniformGrid x:Name="YearViews" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed"/>
                            <primitives:RadUniformGrid x:Name="DecadeViews" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed"/>
                            <primitives:RadUniformGrid x:Name="CenturyViews" Margin="1 1 0 0" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed"/>
                        </calendar:TransitionPanel>
                        <Border x:Name="BorderVisual"
                                Grid.RowSpan="2"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <Border x:Name="Navigation"
                                Margin="0 0 0 -1"
                                Canvas.ZIndex="2"
                                Visibility="{TemplateBinding HeaderVisibility}"
                                Background="{telerik1:Office2016Resource ResourceKey=AccentBrush}"
                                MinHeight="34">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <RepeatButton x:Name="MoveLeft" Grid.Column="0" Style="{StaticResource MoveLeftButtonStyle}"/>
                                <Button x:Name="Header" Grid.Column="1" Style="{StaticResource CalendarHeaderButton}"/>
                                <RepeatButton x:Name="MoveRight" Grid.Column="2" Style="{StaticResource MoveRightButtonStyle}"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="MonthViewPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" FirstColumn="1" VerticalAlignment="Stretch" Rows="7" Columns="8"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="YearViewPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DecadeViewPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="CenturyViewPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <calendar:CalendarPanel PreserveSpaceForCollapsedChildren="True" VerticalAlignment="Stretch" Rows="3" Columns="4"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadCalendar" BasedOn="{StaticResource RadCalendarStyle}"/>
    <Style x:Key="RadClockItemStyle" TargetType="controls:RadClockItem">
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="{StaticResource ClockItemsMargin}"/>
        <Setter Property="Padding" Value="{StaticResource ClockItemPadding}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadClockItem">
                    <Grid x:Name="LayoutRoot" Background="Transparent">
                        <Border x:Name="BorderVisual"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <ContentControl x:Name="Content"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Margin="{TemplateBinding Padding}"
                                Foreground="{TemplateBinding Foreground}"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"/>
                    </Grid>
                    <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=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True"/>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadClockItem" BasedOn="{StaticResource RadClockItemStyle}"/>
    <Style TargetType="controls:RadClock" x:Key="RadClockStyle">
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <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="{StaticResource CalendarHeaderPadding}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="True"/>
        <Setter Property="TabIndex" Value="1"/>
        <Setter Property="StartTime" Value="0:0:0"/>
        <Setter Property="EndTime" Value="23:59:0"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <primitives:RadUniformGrid x:Name="UniformGrid" Columns="4"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock x:Name="ContentText" Text="{Binding}" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadClock">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="BorderVisual"
                                Grid.RowSpan="2"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <Border x:Name="Header"
                                MinHeight="34"
                                Background="{telerik1:Office2016Resource ResourceKey=AccentBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadiusTop}">
                            <ContentControl
                                    IsTabStop="False"
                                    FontWeight="{StaticResource HeaderTextFontWeight}"
                                    Content="{TemplateBinding Header}"
                                    ContentTemplate="{TemplateBinding HeaderTemplate}"
                                    Margin="{TemplateBinding Padding}"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ItemsPresenter Grid.Row="1" Margin="{StaticResource ClockItemsPresenterMargin}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadClock" BasedOn="{StaticResource RadClockStyle}"/>
    <DataTemplate x:Key="TooltipTemplate">
        <Border
                BorderThickness="1"
                BorderBrush="{telerik1:Office2016Resource ResourceKey=BasicBrush}"
                Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
            <ContentControl Margin="5 4" Content="{Binding}" Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        </Border>
    </DataTemplate>
    <Style TargetType="controls:RadDateTimePicker" x:Key="RadDateTimePickerStyle">
        <Setter Property="CalendarStyle" Value="{StaticResource RadCalendarStyle}"/>
        <Setter Property="ClockStyle" Value="{StaticResource RadClockStyle}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="KeyboardNavigation.ControlTabNavigation" Value="Cycle"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="TooltipTemplate" Value="{StaticResource TooltipTemplate}"/>
        <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 4"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadDateTimePicker">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="auto"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="BorderVisual"
                                Grid.ColumnSpan="2"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <Border x:Name="ReadOnlyVisual"
                                Grid.ColumnSpan="2"
                                Background="{telerik1:Office2016Resource ResourceKey=ReadOnlyBackgroundBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                Visibility="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                        <telerik:RadWatermarkTextBox x:Name="PART_DateTimeInput"
                                Text="{Binding DateTimeText, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                CurrentText="{Binding CurrentDateTimeText, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                IsReadOnly="{TemplateBinding IsReadOnly}"
                                Foreground="{TemplateBinding Foreground}"
                                VerticalAlignment="Stretch"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                Background="{x:Null}"
                                BorderThickness="0"
                                BorderBrush="{x:Null}"
                                WatermarkContent="{TemplateBinding DateTimeWatermarkContent}"
                                WatermarkTemplate="{TemplateBinding DateTimeWatermarkTemplate}"
                                TextAlignment="{TemplateBinding TextAlignment}"
                                TabIndex="0"
                                SelectionOnFocus="{TemplateBinding SelectionOnFocus}"
                                Padding="{TemplateBinding Padding}"
                                Margin="1"
                                FontFamily="{telerik1:Office2016Resource ResourceKey=FontFamily}"
                                FontSize="{TemplateBinding FontSize}"/>
                        <Border x:Name="FocusVisual"
                                Opacity="0"
                                Grid.ColumnSpan="2"
                                IsHitTestVisible="False"
                                MinHeight="{TemplateBinding MinHeight}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{x:Null}"
                                BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <telerik:RadDropDownButton
                                Grid.Column="1"
                                TabIndex="1"
                                Padding="0"
                                DropDownIndicatorVisibility="Collapsed"
                                x:Name="PART_DropDownButton"
                                BorderThickness="1"
                                PopupPlacementTarget="{Binding ElementName=PART_DateTimeInput}"
                                IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                CloseOnEnter="True"
                                IsTabStop="False"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Stretch"
                                Width="19"
                                controls:DateTimePickerExtensions.FocusContentOnOpen="True"
                                Margin="-1 1 1 1"
                                Focusable="False">
                            <telerik:RadDropDownButton.DropDownContent>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <controls:RadCalendar x:Name="PART_Calendar"
                                            Grid.Column="0"
                                            Grid.Row="0"
                                            BorderThickness="1 0 1 1"
                                            IsReadOnly="{TemplateBinding IsReadOnly}"
                                            DateSelectionMode="{TemplateBinding DateSelectionMode}"
                                            Culture="{TemplateBinding Culture}"
                                            SelectionMode="Single"
                                            Style="{TemplateBinding CalendarStyle}"
                                            DisplayDateStart="{Binding DisplayDateStart, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            DisplayDate="{Binding DisplayDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            DisplayDateEnd="{Binding DisplayDateEnd, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            SelectableDateStart="{Binding SelectableDateStart, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            SelectedDate="{Binding SelectedDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            SelectableDateEnd="{Binding SelectableDateEnd, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            BlackoutDates="{Binding BlackoutDates, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                            Panel.ZIndex="1"/>
                                    <Rectangle x:Name="Separator" Grid.Column="1" Fill="Transparent" Panel.ZIndex="100" Width="1" HorizontalAlignment="Left"/>
                                    <controls:DateTimePickerClock x:Name="PART_Clock"
                                            Grid.Column="1"
                                            Grid.Row="0"
                                            BorderThickness="0 0 1 0"
                                            ItemsSource="{TemplateBinding ClockItemsSource}"
                                            StartTime="{TemplateBinding StartTime}"
                                            EndTime="{TemplateBinding EndTime}"
                                            TimeInterval="{Binding TimeInterval, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            IsReadOnly="{TemplateBinding IsReadOnly}"
                                            Style="{TemplateBinding ClockStyle}"
                                            Culture="{TemplateBinding Culture}"
                                            SelectedItem="{Binding SelectedTime, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            Margin="-1 0 0 0"/>
                                    <Border x:Name="CloseButtonContainer"
                                            Grid.ColumnSpan="3"
                                            Grid.Row="1"
                                            telerik:TouchManager.TouchMode="None"
                                            BorderThickness="1"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            Margin="0 -1 0 0"
                                            Background="{TemplateBinding Background}">
                                        <telerik:RadButton x:Name="PART_Close"
                                                TabIndex="2"
                                                IsTabStop="True"
                                                HorizontalAlignment="Right"
                                                Padding="20 4"
                                                Margin="4 4 4 3"
                                                telerik:LocalizationManager.ResourceKey="Close"
                                                Command="{x:Static controls:RadDateTimePickerCommands.Close}"
                                                KeyboardNavigation.TabNavigation="Once"/>
                                    </Border>
                                    <Border x:Name="TodayButtonBorder"
                                            Grid.Row="1"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="0"
                                            SnapsToDevicePixels="True"
                                            Visibility="{TemplateBinding TodayButtonVisibility}">
                                        <telerik:RadButton x:Name="TodayButton" Command="{x:Static telerik:RadDateTimePickerCommands.SetToday}" BorderThickness="0" Content="{TemplateBinding TodayButtonContent}"/>
                                    </Border>
                                </Grid>
                            </telerik:RadDropDownButton.DropDownContent>
                            <telerik:RadDropDownButton.Template>
                                <ControlTemplate TargetType="telerik:RadDropDownButton">
                                    <Grid>
                                        <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                        <Popup x:Name="DropDownPopup"
                                                VerticalOffset="2"
                                                Margin="0 1"
                                                HorizontalOffset="-1"
                                                AllowsTransparency="True"
                                                StaysOpen="False"
                                                Focusable="false"
                                                Placement="Bottom"
                                                IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                                            <ContentPresenter x:Name="DropDownPopupContent"
                                                    Content="{TemplateBinding DropDownContent}"
                                                    ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                                    DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                                        </Popup>
                                    </Grid>
                                </ControlTemplate>
                            </telerik:RadDropDownButton.Template>
                            <Grid>
                                <Grid x:Name="DropDownIcon" Background="Transparent" Margin="0 1">
                                    <TextBlock x:Name="DateTimePickerIcon"
                                            Visibility="Collapsed"
                                            Text="{StaticResource GlyphGrid}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            FontSize="16"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Margin="0 0 4 0"/>
                                    <TextBlock x:Name="CalendarIcon"
                                            Visibility="Collapsed"
                                            Text="{StaticResource GlyphCalendar}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            FontSize="16"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Margin="0 0 4 0"/>
                                    <TextBlock x:Name="ClockIcon"
                                            Visibility="Collapsed"
                                            Text="{StaticResource GlyphClock}"
                                            FontFamily="{StaticResource TelerikWebUI}"
                                            FontSize="16"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Margin="0 0 4 0"/>
                                </Grid>
                            </Grid>
                        </telerik:RadDropDownButton>
                        <Popup x:Name="PART_InputPopup"
                                telerik:PopupExtensions.IsOpen="{Binding IsTooltipOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                telerik:PopupExtensions.Placement="Top"
                                VerticalOffset="-2"
                                HorizontalOffset="-1"
                                telerik:PopupExtensions.PlacementTarget="{Binding ElementName=PART_DateTimeInput}"
                                telerik:PopupExtensions.Owner="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                StaysOpen="False"
                                AllowsTransparency="True">
                            <ContentPresenter Content="{TemplateBinding TooltipContent}" ContentTemplate="{TemplateBinding TooltipTemplate}"/>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="ReadOnlyVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="DateTimePickerIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="ClockIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="CalendarIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="DropDownIcon" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True">
                            <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                            <Setter TargetName="DateTimePickerIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                            <Setter TargetName="ClockIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                            <Setter TargetName="CalendarIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                        </Trigger>
                        <Trigger Property="InputMode" Value="DateTimePicker">
                            <Setter TargetName="DateTimePickerIcon" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="TodayButtonBorder" Property="BorderThickness" Value="0"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="InputMode" Value="DateTimePicker"/>
                                <Condition Property="TodayButtonVisibility" Value="Visible"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="TodayButtonBorder" Property="BorderThickness" Value="1 0 1 1"/>
                        </MultiTrigger>
                        <Trigger Property="InputMode" Value="DatePicker">
                            <Setter TargetName="PART_Clock" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="CloseButtonContainer" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="CalendarIcon" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="Separator" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="TodayButtonBorder" Property="BorderThickness" Value="0"/>
                            <Setter TargetName="TodayButtonBorder" Property="MinHeight" Value="34"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="InputMode" Value="DatePicker"/>
                                <Condition Property="TodayButtonVisibility" Value="Visible"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="TodayButtonBorder" Property="BorderThickness" Value="1 0 1 1"/>
                        </MultiTrigger>
                        <Trigger Property="InputMode" Value="TimePicker">
                            <Setter TargetName="PART_Calendar" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="CloseButtonContainer" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="ClockIcon" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="TodayButtonBorder" Property="Grid.Column" Value="2"/>
                            <Setter TargetName="TodayButtonBorder" Property="BorderThickness" Value="1 0 1 1"/>
                            <Setter TargetName="TodayButtonBorder" Property="MinHeight" Value="34"/>
                            <Setter TargetName="PART_Clock" Property="BorderThickness" Value="1 0 1 1"/>
                            <Setter TargetName="PART_Clock" Property="Margin" Value="0"/>
                        </Trigger>
                        <DataTrigger Binding="{Binding IsOpen, ElementName=PART_DropDownButton}" Value="IsOpen">
                            <Setter TargetName="PART_Calendar" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="CloseButtonContainer" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="ClockIcon" Property="Visibility" Value="Visible"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadDateTimePicker" BasedOn="{StaticResource RadDateTimePickerStyle}"/>
    <Style TargetType="controls:RadDatePicker" BasedOn="{StaticResource RadDateTimePickerStyle}">
        <Setter Property="InputMode" Value="DatePicker"/>
    </Style>
    <Style TargetType="controls:RadTimePicker" BasedOn="{StaticResource RadDateTimePickerStyle}">
        <Setter Property="InputMode" Value="TimePicker"/>
    </Style>
    <Style x:Key="CalculatorPickerDisplayValueStyle" TargetType="TextBox">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="0 0 18 0"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsEnabled" Value="False"/>
        <Setter Property="IsReadOnly" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <ScrollViewer x:Name="PART_ContentHost"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                            ScrollViewer.VerticalScrollBarVisibility="Disabled"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadCalculatorPickerTemplate" TargetType="controls:RadCalculatorPicker">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <TextBox x:Name="PART_CalculatorInput"
                    Foreground="{TemplateBinding Foreground}"
                    Padding="{TemplateBinding Padding}"
                    Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisplayedValue, Mode=TwoWay}"
                    Style="{StaticResource CalculatorPickerDisplayValueStyle}"/>
            <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                    Grid.Column="0"
                    Grid.ColumnSpan="2"
                    CloseOnEnter="True"
                    DropDownIndicatorVisibility="Collapsed"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Padding="0"
                    PopupPlacementTarget="{Binding ElementName=PART_CalculatorInput}"
                    TabIndex="1"
                    Focusable="False"
                    IsBackgroundVisible="False">
                <telerik:RadDropDownButton.DropDownContent>
                    <controls:RadCalculator x:Name="PART_Calculator"
                            MemoryButtonsVisibility="{TemplateBinding MemoryButtonsVisibility}"
                            Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=Value}"
                            MemoryValue="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=MemoryValue}"
                            ErrorMessage="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=ErrorMessage}"/>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Template>
                    <ControlTemplate TargetType="telerik:RadDropDownButton">
                        <Grid Background="Transparent">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <Popup x:Name="DropDownPopup"
                                    VerticalOffset="1"
                                    AllowsTransparency="True"
                                    StaysOpen="False"
                                    Focusable="false"
                                    Placement="Bottom"
                                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                                <ContentPresenter x:Name="DropDownPopupContent"
                                        Content="{TemplateBinding DropDownContent}"
                                        ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                            </Popup>
                        </Grid>
                    </ControlTemplate>
                </telerik:RadDropDownButton.Template>
                <TextBlock x:Name="DropDownIcon"
                        FontFamily="{StaticResource TelerikWebUI}"
                        FontSize="16"
                        FontWeight="Normal"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Right"
                        SnapsToDevicePixels="True"
                        Margin="0 0 2 0"
                        Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                        Text="{StaticResource GlyphCalculator}"/>
            </telerik:RadDropDownButton>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter TargetName="DropDownIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
                <Setter TargetName="DropDownIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_CalculatorInput" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="DropDownIcon" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="DropDownIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadCalculatorPickerStyle" TargetType="controls:RadCalculatorPicker">
        <Setter Property="Template" Value="{StaticResource RadCalculatorPickerTemplate}"/>
        <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 5 0 5"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
    </Style>
    <Style TargetType="controls:RadCalculatorPicker" BasedOn="{StaticResource RadCalculatorPickerStyle}"/>
    <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="controls:RadColorPaletteViewItem">
        <Setter Property="Margin" Value="2 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls: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="controls: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="controls: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="controls: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="controls: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>
                            <controls: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">
                                <controls:RadColorPaletteView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <primitives:RadUniformGrid Background="Transparent" Columns="10"/>
                                    </ItemsPanelTemplate>
                                </controls:RadColorPaletteView.ItemsPanel>
                            </controls:RadColorPaletteView>
                            <controls:RadColorPaletteView x:Name="MainPalette"
                                    Grid.Row="3"
                                    Margin="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>
                            <controls: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}">
                                <controls:RadColorPaletteView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <primitives:RadUniformGrid Background="Transparent" Columns="10"/>
                                    </ItemsPanelTemplate>
                                </controls:RadColorPaletteView.ItemsPanel>
                            </controls:RadColorPaletteView>
                            <Border x:Name="RecentColorsPaletteBorder"
                                    Grid.Row="6"
                                    Visibility="Collapsed"
                                    Background="{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>
                            <controls: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">
                                <controls:RadColorPaletteView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <primitives:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                                    </ItemsPanelTemplate>
                                </controls:RadColorPaletteView.ItemsPanel>
                            </controls:RadColorPaletteView>
                            <Border Margin="0 1 0 0" Visibility="Collapsed" x:Name="AdditionalContentBorder" Grid.Row="8" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0 1 0 0">
                                <ContentPresenter Margin="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="controls:RadColorPicker">
        <Setter Property="MainPaletteColumnsCount" Value="10"/>
        <Setter Property="MainPaletteOrientation" Value="Vertical"/>
        <Setter Property="MainPalette" Value="Office"/>
        <Setter Property="HeaderPaletteVisibility" Value="Visible"/>
        <Setter Property="MainPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorMainPaletteHeaderText}"/>
        <Setter Property="NoColorText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorAutomaticColorText}"/>
        <Setter Property="RecentColorsHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorRecentColorsHeaderText}"/>
        <Setter Property="StandardPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManager}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorStandardPaletteHeaderText}"/>
        <Setter Property="StandardPaletteVisibility" Value="Visible"/>
        <Setter Property="NoColorVisibility" Value="Visible"/>
        <Setter Property="SelectedColor" Value="Black"/>
        <Setter Property="StandardPalette" Value="Standard"/>
        <Setter Property="HeaderPalette" Value="Office"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="BorderBrush" Value="{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="controls:RadColorPicker">
                    <Grid x:Name="Root"
                            Width="{TemplateBinding Width}"
                            Height="{TemplateBinding Height}"
                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <telerik1:RadSplitButton x:Name="SplitButton"
                                Style="{TemplateBinding SplitButtonStyle}"
                                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>
                                <controls:RadColorSelector x:Name="ColorSelector"
                                        Style="{TemplateBinding ColorSelectorStyle}"
                                        Command="{TemplateBinding Command}"
                                        CommandParameter="{TemplateBinding CommandParameter}"
                                        CommandTarget="{TemplateBinding CommandTarget}"
                                        ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                        MainPalette="{TemplateBinding MainPalette}"
                                        MainPaletteItemsStyle="{TemplateBinding MainPaletteItemsStyle}"
                                        MainPaletteColumnsCount="{TemplateBinding MainPaletteColumnsCount}"
                                        MainPaletteItemsSource="{TemplateBinding MainPaletteItemsSource}"
                                        MainPaletteOrientation="{TemplateBinding MainPaletteOrientation}"
                                        MainPaletteHeaderText="{TemplateBinding MainPaletteHeaderText}"
                                        HeaderPalette="{TemplateBinding HeaderPalette}"
                                        HeaderPaletteVisibility="{TemplateBinding HeaderPaletteVisibility}"
                                        HeaderPaletteItemsSource="{TemplateBinding HeaderPaletteItemsSource}"
                                        StandardPalette="{TemplateBinding StandardPalette}"
                                        StandardPaletteVisibility="{TemplateBinding StandardPaletteVisibility}"
                                        StandardPaletteHeaderText="{TemplateBinding StandardPaletteHeaderText}"
                                        StandardPaletteItemsSource="{TemplateBinding StandardPaletteItemsSource}"
                                        PaletteItemsTemplate="{TemplateBinding PaletteItemsTemplate}"
                                        AutomaticColor="{Binding AutomaticColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                        NoColorText="{TemplateBinding NoColorText}"
                                        RecentColorsHeaderText="{TemplateBinding RecentColorsHeaderText}"
                                        RecentColorsVisibility="{TemplateBinding RecentColorsVisibility}"
                                        IsRecentColorsActive="{TemplateBinding IsRecentColorsActive}"
                                        RecentColorsItemsSource="{TemplateBinding RecentColorsItemsSource}"
                                        AdditionalContent="{TemplateBinding AdditionalContent}"
                                        AdditionalContentTemplate="{TemplateBinding AdditionalContentTemplate}"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="1"
                                        NoColorVisibility="{TemplateBinding NoColorVisibility}"
                                        SelectedColor="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedColor, Mode=TwoWay}"
                                        SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem, Mode=TwoWay}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        FontStyle="{TemplateBinding FontStyle}"
                                        Foreground="{TemplateBinding Foreground}"
                                        Margin="-1"/>
                            </telerik1:RadSplitButton.DropDownContent>
                        </telerik1:RadSplitButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadColorPaletteViewItem" BasedOn="{StaticResource RadColorPaletteViewItemStyle}"/>
    <Style TargetType="controls:RadColorPaletteView" BasedOn="{StaticResource RadColorPaletteViewStyle}"/>
    <Style TargetType="controls:RadColorSelector" BasedOn="{StaticResource RadColorSelectorStyle}"/>
    <Style TargetType="controls:RadColorPicker" BasedOn="{StaticResource RadColorPickerStyle}"/>
    <colorPickerConverters:HueConverter x:Key="HueConverter"/>
    <colorPickerConverters:EnumConverter x:Key="EnumConverter"/>
    <colorPickerConverters:ColorToHSColorBrushConverter x:Key="ColorToHSColorBrushConverter"/>
    <colorMode:ColorModeCollection x:Key="ColorModeCollection"/>
    <LinearGradientBrush x:Key="HueBrush" StartPoint="0.5,0.025" EndPoint="0.5,1">
        <GradientStop Color="#FFFF0000"/>
        <GradientStop Color="#FEFFFF00" Offset="0.167"/>
        <GradientStop Color="#FE00FF00" Offset="0.333"/>
        <GradientStop Color="#FE00FFFF" Offset="0.5"/>
        <GradientStop Color="#FE0000FF" Offset="0.667"/>
        <GradientStop Color="#FEFF00FF" Offset="0.833"/>
        <GradientStop Color="#FFFF0000" Offset="1.0"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="HueBrushHorizontal" StartPoint="0, 0.5" EndPoint="1,0.5">
        <GradientStop Color="#FFFF0000"/>
        <GradientStop Color="#FEFFFF00" Offset="0.167"/>
        <GradientStop Color="#FE00FF00" Offset="0.333"/>
        <GradientStop Color="#FE00FFFF" Offset="0.5"/>
        <GradientStop Color="#FE0000FF" Offset="0.667"/>
        <GradientStop Color="#FEFF00FF" Offset="0.833"/>
        <GradientStop Color="#FFFF0000" Offset="1.0"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ZeroGrayBrush" StartPoint="0.5, 0" EndPoint="0.5, 1">
        <GradientStop Color="Transparent" Offset="0"/>
        <GradientStop Color="Gray" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ZeroToWhiteBrush" StartPoint="0.5, 1" EndPoint="0.5,0">
        <GradientStop Color="Transparent" Offset="0.1"/>
        <GradientStop Color="White" Offset="0.9"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="ZeroToBlackBrush" StartPoint="0.5, 0" EndPoint="0.5,1">
        <GradientStop Color="Transparent" Offset="0.1"/>
        <GradientStop Color="Black" Offset="0.9"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SaturationValueBrush1" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FFFFFFFF"/>
        <GradientStop Color="#00FFFFFF" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SaturationValueBrush2" EndPoint="0.5,0" StartPoint="0.5,1">
        <GradientStop Color="#FF000000" Offset="0"/>
        <GradientStop Color="#00000000" Offset="1"/>
    </LinearGradientBrush>
    <Style x:Key="PadStyle" TargetType="pad:Pad">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="pad:Pad">
                    <Grid Background="Transparent">
                        <Canvas x:Name="Canvas">
                            <ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}"/>
                        </Canvas>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadColorEditorStyle" TargetType="controls:RadColorEditor">
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="9"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorEditor">
                    <Border x:Name="LayoutRoot"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <Grid x:Name="SectionsGrid">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid x:Name="SaturationValuePadGrid" Margin="0 0 5 5">
                                <Rectangle Fill="{Binding PointerRelativePosition.Y, ElementName=HuePad, Converter={StaticResource HueConverter}}"/>
                                <Rectangle Fill="{StaticResource SaturationValueBrush1}"/>
                                <Rectangle Fill="{StaticResource SaturationValueBrush2}"/>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                    <pad:Pad x:Name="SaturationValuePad" MovementDirection="Both">
                                        <Grid Width="12" Height="12">
                                            <Ellipse Stroke="Black" StrokeThickness="1"/>
                                            <Ellipse Stroke="White" StrokeThickness="1" Margin="1"/>
                                        </Grid>
                                    </pad:Pad>
                                </Border>
                            </Grid>
                            <Grid x:Name="HueSaturationPadGrid" Margin="0 0 5 5">
                                <Rectangle Fill="{StaticResource HueBrushHorizontal}"/>
                                <Rectangle Fill="{StaticResource ZeroGrayBrush}"/>
                                <pad:Pad x:Name="HueSaturationPad" MovementDirection="Both">
                                    <Grid Width="12" Height="12">
                                        <Ellipse Stroke="Black" StrokeThickness="1"/>
                                        <Ellipse Stroke="White" StrokeThickness="1" Margin="1"/>
                                    </Grid>
                                </pad:Pad>
                            </Grid>
                            <Grid x:Name="InitAndCurrentColorGrid" Grid.Row="1" Margin="0 0 5 0" Height="22">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Border x:Name="ChessBoardRect" Grid.ColumnSpan="2" Background="Black" BorderThickness="1 1 2 1">
                                    <Border.Effect>
                                        <effects:ChessboardEffect/>
                                    </Border.Effect>
                                </Border>
                                <Border x:Name="PART_InitialColor"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="1 1 0 1"
                                        Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InitialColor, Converter={StaticResource converter}}">
                                    <ToolTipService.ToolTip>
                                        <TextBlock Text="{telerik:LocalizableResource Key=ColorEditorInitialColor}"/>
                                    </ToolTipService.ToolTip>
                                </Border>
                                <Border
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="0 1 1 1"
                                        Grid.Column="1"
                                        Margin="-1 0 0 0"
                                        Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedColor, Converter={StaticResource converter}}">
                                    <ToolTipService.ToolTip>
                                        <TextBlock Text="{telerik:LocalizableResource Key=ColorEditorSelectedColor}"/>
                                    </ToolTipService.ToolTip>
                                </Border>
                                <Border
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="1"
                                        Grid.Column="2"
                                        Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=PreviousColor, Converter={StaticResource converter}}"
                                        Margin="5 0 0 0"
                                        Width="22">
                                    <ToolTipService.ToolTip>
                                        <TextBlock Text="{telerik:LocalizableResource Key=ColorEditorPreviousColor}"/>
                                    </ToolTipService.ToolTip>
                                </Border>
                            </Grid>
                            <Grid Grid.Column="1" x:Name="HuePadGrid" Margin="0 0 0 5" Width="22">
                                <Rectangle Fill="{StaticResource HueBrush}"/>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                    <pad:Pad x:Name="HuePad" MovementDirection="Y">
                                        <Grid Width="30" Height="16" Margin="-5 0 0 0">
                                            <TextBlock FontFamily="{StaticResource TelerikWebUI}" FontSize="16" Text="{StaticResource GlyphArrow60Right}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                            <TextBlock FontFamily="{StaticResource TelerikWebUI}" FontSize="16" Text="{StaticResource GlyphArrow60Left}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                                        </Grid>
                                    </pad:Pad>
                                </Border>
                            </Grid>
                            <Grid Grid.Column="1" x:Name="LuminancePadGrid" Margin="0 0 0 5" Width="22">
                                <Rectangle Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedColor, Converter={StaticResource ColorToHSColorBrushConverter}}"/>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <Rectangle Fill="{StaticResource ZeroToWhiteBrush}"/>
                                    <Rectangle Fill="{StaticResource ZeroToBlackBrush}" Grid.Row="1"/>
                                </Grid>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                    <pad:Pad x:Name="LuminancePad" MovementDirection="Y">
                                        <Grid Width="30" Height="16" Margin="-5 0 0 0">
                                            <TextBlock FontFamily="{StaticResource TelerikWebUI}" FontSize="16" Text="{StaticResource GlyphArrow60Right}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                            <TextBlock FontFamily="{StaticResource TelerikWebUI}" FontSize="16" Text="{StaticResource GlyphArrow60Left}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                                        </Grid>
                                    </pad:Pad>
                                </Border>
                            </Grid>
                            <Grid Grid.Column="2" x:Name="ColorModesGrid" Margin="10 0 0 0" Width="184">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <controls:RadComboBox
                                        IsEditable="True"
                                        IsReadOnly="True"
                                        ItemsSource="{Binding Source={StaticResource ColorModeCollection}}"
                                        FontSize="{TemplateBinding FontSize}"
                                        SelectedIndex="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColorMode, Mode=TwoWay, Converter={StaticResource EnumConverter}}"
                                        HorizontalAlignment="Stretch"
                                        Margin="15 0 0 3"/>
                                <Grid x:Name="RgbTemplate" Grid.Row="1" Visibility="Collapsed">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Label_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Input_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock
                                            Text="R"
                                            Grid.Row="0"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="G"
                                            Grid.Row="1"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="B"
                                            Grid.Row="2"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Red, Mode=TwoWay, FallbackValue=0}"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}"
                                            Mask="#3"
                                            HorizontalAlignment="Stretch"
                                            UpdateValueEvent="LostFocus"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Green, Mode=TwoWay, FallbackValue=0}"
                                            Mask="#3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}"
                                            HorizontalAlignment="Stretch"
                                            UpdateValueEvent="LostFocus"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="2"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Blue, Mode=TwoWay, FallbackValue=0}"
                                            Mask="#3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="RgbSliderRed"
                                            Maximum="255"
                                            SmallChange="1"
                                            LargeChange="1"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Red, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="RgbSliderGreen"
                                            Maximum="255"
                                            SmallChange="1"
                                            LargeChange="1"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Green, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="RgbSliderBlue"
                                            Maximum="255"
                                            SmallChange="1"
                                            LargeChange="1"
                                            Grid.Row="2"
                                            Grid.Column="2"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Rgba.Blue, Mode=TwoWay}"/>
                                </Grid>
                                <Grid x:Name="HlsTemplate" Grid.Row="1" Visibility="Collapsed">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Label_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Input_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock
                                            Text="H"
                                            Grid.Row="0"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="L"
                                            Grid.Row="1"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="S"
                                            Grid.Row="2"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Hue, Mode=TwoWay, FallbackValue=0}"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}°"
                                            Mask="#3°"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Luminance, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="2"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Saturation, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HlsSliderHue"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            Maximum="360"
                                            SmallChange="1"
                                            LargeChange="1"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Hue, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HlsSliderLuminance"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Luminance, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HlsSliderSaturation"
                                            Grid.Row="2"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hlsa.Saturation, Mode=TwoWay}"/>
                                </Grid>
                                <Grid x:Name="HsvTemplate" Grid.Row="1" Visibility="Collapsed">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Label_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Input_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock
                                            Text="H"
                                            Grid.Row="0"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="S"
                                            Grid.Row="1"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="V"
                                            Grid.Row="2"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Hue, Mode=TwoWay, FallbackValue=0}"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:n0}°"
                                            Mask="#3°"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Saturation, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="2"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Value, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HsvSliderHue"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            Maximum="360"
                                            SmallChange="1"
                                            LargeChange="1"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Hue, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HsvSliderSaturation"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Saturation, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="HsvSliderValue"
                                            Grid.Row="2"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hsva.Value, Mode=TwoWay}"/>
                                </Grid>
                                <Grid x:Name="CmykTemplate" Grid.Row="1" Visibility="Collapsed">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Label_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Input_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock
                                            Text="C"
                                            Grid.Row="0"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="M"
                                            Grid.Row="1"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="Y"
                                            Grid.Row="2"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBlock
                                            Text="K"
                                            Grid.Row="3"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="0"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Cyan, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Magenta, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Row="2"
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Yellow, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <controls:RadMaskedNumericInput
                                            FontSize="{TemplateBinding FontSize}"
                                            Grid.Row="3"
                                            Grid.Column="1"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Key, Mode=TwoWay, FallbackValue=0}"
                                            Mask="p3"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="CmykSliderCyan"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Cyan, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="CmykSliderMagenta"
                                            Grid.Row="1"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Magenta, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="CmykSliderYellow"
                                            Grid.Row="2"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Yellow, Mode=TwoWay}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="CmykSliderKey"
                                            Grid.Row="3"
                                            Grid.Column="2"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Cmyka.Key, Mode=TwoWay}"/>
                                </Grid>
                                <Grid Grid.Row="2" Visibility="{TemplateBinding AlphaSettingsVisibility}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Label_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Input_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock
                                            Text="A"
                                            Grid.Column="0"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Left"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <controls:RadMaskedNumericInput
                                            Grid.Column="1"
                                            FontSize="{TemplateBinding FontSize}"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.SelectedColorViewModel.Alpha, Mode=TwoWay, FallbackValue=0}"
                                            IsClearButtonVisible="False"
                                            FormatString="{}{0:p0}"
                                            Mask="p3"
                                            HorizontalAlignment="Stretch"
                                            telerikMaskedInput:MaskedInputExtensions.AllowNull="False"
                                            UpdateValueEvent="LostFocus"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                    <telerik:RadSlider
                                            IsMoveToPointEnabled="True"
                                            x:Name="SliderAlpha"
                                            SmallChange="0.01"
                                            LargeChange="0.01"
                                            Grid.Row="0"
                                            Grid.Column="2"
                                            VerticalAlignment="Center"
                                            Value="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.SelectedColorViewModel.Alpha, Mode=TwoWay}"/>
                                </Grid>
                                <Grid Grid.Row="3">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MinWidth="{StaticResource ColorEditor_Label_MinWidth}" Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock
                                            Text="#"
                                            Grid.Column="0"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Center"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                    <TextBox
                                            Grid.Column="1"
                                            colorEditorHelpers:TextBoxHelper.UpdateTextBindingOnKeyPress="True"
                                            Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=ViewModel.Hex.Value, Mode=TwoWay}"
                                            FontSize="{TemplateBinding FontSize}"
                                            Margin="{StaticResource ColorEditor_Input_Margin}"/>
                                </Grid>
                            </Grid>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ColorMode" Value="RGB">
                            <Setter Property="Visibility" TargetName="RgbTemplate" Value="Visible"/>
                            <Setter Property="Visibility" TargetName="HlsTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="HsvTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="CmykTemplate" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ColorMode" Value="HSV">
                            <Setter Property="Visibility" TargetName="RgbTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="HlsTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="HsvTemplate" Value="Visible"/>
                            <Setter Property="Visibility" TargetName="CmykTemplate" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ColorMode" Value="HLS">
                            <Setter Property="Visibility" TargetName="RgbTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="HlsTemplate" Value="Visible"/>
                            <Setter Property="Visibility" TargetName="HsvTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="CmykTemplate" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="ColorMode" Value="CMYK">
                            <Setter Property="Visibility" TargetName="RgbTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="HlsTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="HsvTemplate" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="CmykTemplate" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style BasedOn="{StaticResource PadStyle}" TargetType="pad:Pad"/>
    <Style TargetType="controls:RadColorEditor" BasedOn="{StaticResource RadColorEditorStyle}"/>
    <Style x:Key="MaskedInputTextBoxStyle" TargetType="telerikMaskedInput:PreviewInputTextBox">
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerikMaskedInput:PreviewInputTextBox">
                    <ScrollViewer
                            Padding="{TemplateBinding Padding}"
                            Background="Transparent"
                            BorderThickness="0"
                            Foreground="{TemplateBinding Foreground}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            x:Name="PART_ContentHost"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="MaskedInputClearButtonTemplate" TargetType="telerik1:RadButton">
        <Border x:Name="ButtonBorder" Background="Transparent">
            <TextBlock x:Name="Path"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    FontFamily="{StaticResource TelerikWebUI}"
                    FontSize="16"
                    Text="{StaticResource GlyphClose}"
                    Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"/>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=ValidationBrush}" TargetName="Path"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=ValidationBrush}" TargetName="Path"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="MaskedInputClearButtonStyle" TargetType="telerik1:RadButton">
        <Setter Property="Template" Value="{StaticResource MaskedInputClearButtonTemplate}"/>
        <Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{x:Null}"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Margin" Value="0 0 2 0"/>
    </Style>
    <Style TargetType="controls:RadMaskedInputBase" x:Key="RadMaskedInputBaseStyle">
        <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="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="Padding" Value="4"/>
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="TextBoxStyle" Value="{StaticResource MaskedInputTextBoxStyle}"/>
        <Setter Property="ClearButtonStyle" Value="{StaticResource MaskedInputClearButtonStyle}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="IsReadOnly" Value="False"/>
        <Setter Property="TextMode" Value="MaskedText"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadMaskedInputBase">
                    <Grid UseLayoutRounding="True" SnapsToDevicePixels="True">
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                SnapsToDevicePixels="True"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}">
                            <Grid x:Name="GridContainer">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Border x:Name="ReadOnlyVisual"
                                        Grid.ColumnSpan="2"
                                        BorderThickness="0"
                                        BorderBrush="{x:Null}"
                                        Background="{telerik1:Office2016Resource ResourceKey=ReadOnlyBackgroundBrush}"
                                        SnapsToDevicePixels="True"
                                        CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"
                                        Opacity="0"/>
                                <telerikMaskedInput:PreviewInputTextBox x:Name="EditorSite"
                                        TabIndex="{TemplateBinding TabIndex}"
                                        AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                                        Cursor="{TemplateBinding Cursor}"
                                        AcceptsReturn="{TemplateBinding AcceptsReturn}"
                                        IsEnabled="{TemplateBinding IsEnabled}"
                                        Background="{TemplateBinding Background}"
                                        Foreground="{TemplateBinding Foreground}"
                                        IsReadOnly="{TemplateBinding IsReadOnly}"
                                        Padding="{TemplateBinding Padding}"
                                        Height="{TemplateBinding Height}"
                                        TextAlignment="{Binding HorizontalContentAlignment, Converter={StaticResource conv}, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                        Style="{TemplateBinding TextBoxStyle}"
                                        FontFamily="{TemplateBinding FontFamily}"
                                        FontSize="{TemplateBinding FontSize}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        CaretBrush="{telerik1:Office2016Resource ResourceKey=MarkerBrush}"/>
                                <Border IsHitTestVisible="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" x:Name="DisplayTextContent" Visibility="Collapsed">
                                    <telerikMaskedInput:PreviewInputTextBox x:Name="DisplayText"
                                            AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                                            Cursor="{TemplateBinding Cursor}"
                                            Text="{Binding Path=Text, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=OneWay}"
                                            IsTabStop="False"
                                            Padding="{TemplateBinding Padding}"
                                            IsEnabled="{TemplateBinding IsEnabled}"
                                            Foreground="{TemplateBinding Foreground}"
                                            IsReadOnly="{TemplateBinding IsReadOnly}"
                                            Style="{TemplateBinding TextBoxStyle}"
                                            Height="{TemplateBinding Height}"
                                            TextAlignment="{Binding HorizontalContentAlignment, Converter={StaticResource conv}, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            FontFamily="{TemplateBinding FontFamily}"
                                            FontSize="{TemplateBinding FontSize}"
                                            FontWeight="{TemplateBinding FontWeight}"/>
                                </Border>
                                <Border IsHitTestVisible="False" x:Name="EmptyContent" Visibility="Collapsed" Padding="5 0 0 0">
                                    <ContentControl x:Name="Content"
                                            IsTabStop="False"
                                            Content="{TemplateBinding EmptyContent}"
                                            ContentTemplate="{TemplateBinding EmptyContentTemplate}"
                                            Foreground="{TemplateBinding Foreground}"
                                            Margin="{TemplateBinding Padding}"
                                            FontStyle="Italic"
                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                </Border>
                                <telerik1:RadButton x:Name="ClearButton"
                                        Command="{TemplateBinding ClearCommand}"
                                        IsTabStop="False"
                                        Style="{TemplateBinding ClearButtonStyle}"
                                        Opacity="0"
                                        Grid.Column="1"
                                        Visibility="{Binding Path=IsClearButtonVisible, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource boolToVisConverter}}"/>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsReadOnly" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=ReadOnlyBorderBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=ReadOnlyBackgroundBrush}"/>
                            <Setter TargetName="ClearButton" Property="Visibility" Value="Hidden"/>
                            <Setter TargetName="ReadOnlyVisual" Property="Opacity" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                            <Setter TargetName="DisplayTextContent" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="EditorSite" Property="Opacity" Value="1"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="False">
                            <Setter TargetName="DisplayTextContent" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="EditorSite" Property="Opacity" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="ClearButton" Property="Opacity" Value="1"/>
                        </Trigger>

                        <!-- Content State - Empty -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocusWithin" Value="False"/>
                                <Condition Property="IsEmpty" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="EmptyContent" Value="Visible"/>
                            <Setter Property="Opacity" TargetName="DisplayTextContent" Value="0"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="DisplayText" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadMaskedCurrencyInput" BasedOn="{StaticResource RadMaskedInputBaseStyle}" x:Key="RadMaskedCurrencyInputStyle">
        <Setter Property="InputBehavior" Value="Insert"/>
        <Setter Property="Mask" Value="c9.2"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
        <Setter Property="AllowSkipPlaceholders" Value="false"/>
        <Setter Property="AutoFillZeros" Value="false"/>
        <Setter Property="SectionsNavigationMode" Value="None"/>
    </Style>
    <Style TargetType="controls:RadMaskedNumericInput" BasedOn="{StaticResource RadMaskedInputBaseStyle}" x:Key="RadMaskedNumericInputStyle">
        <Setter Property="InputBehavior" Value="Insert"/>
        <Setter Property="Mask" Value="#9.2"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
        <Setter Property="AllowSkipPlaceholders" Value="false"/>
        <Setter Property="AutoFillZeros" Value="false"/>
        <Setter Property="SectionsNavigationMode" Value="None"/>
    </Style>
    <Style TargetType="controls:RadMaskedTextInput" BasedOn="{StaticResource RadMaskedInputBaseStyle}" x:Key="RadMaskedTextInputStyle">
        <Setter Property="Mask" Value="a20"/>
        <Setter Property="SpinMode" Value="None"/>
        <Setter Property="SelectionOnFocus" Value="CaretToBeginning"/>
        <Setter Property="SectionsNavigationMode" Value="Once"/>
    </Style>
    <Style TargetType="controls:RadMaskedDateTimeInput" BasedOn="{StaticResource RadMaskedInputBaseStyle}" x:Key="RadMaskedDateTimeInputStyle">
        <Setter Property="Mask" Value="d"/>
        <Setter Property="SpinMode" Value="Position"/>
        <Setter Property="SectionsNavigationMode" Value="Once"/>
    </Style>
    <Style TargetType="controls:RadMaskedNumericInput" BasedOn="{StaticResource RadMaskedNumericInputStyle}"/>
    <Style TargetType="controls:RadMaskedCurrencyInput" BasedOn="{StaticResource RadMaskedCurrencyInputStyle}"/>
    <Style TargetType="controls:RadMaskedDateTimeInput" BasedOn="{StaticResource RadMaskedDateTimeInputStyle}"/>
    <Style TargetType="controls:RadMaskedTextInput" BasedOn="{StaticResource RadMaskedTextInputStyle}"/>
    <sys:Double x:Key="RatingItemFontSize">20</sys:Double>
    <Style x:Key="RadRatingStyle" TargetType="controls:RadRating">
        <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="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadRating">
                    <Grid x:Name="Root">
                        <Border x:Name="BorderVisual" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ItemsPresenter/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRatingItemStyle" TargetType="controls:RadRatingItem">
        <Setter Property="Background" Value="{telerik1:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Tag" Value="20"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadRatingItem">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="ReadOnlyRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FillStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1000000"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Empty"/>
                                <VisualState x:Name="Partial"/>
                                <VisualState x:Name="Filled"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="itemGrid" Margin="{TemplateBinding Padding}" Background="Transparent">
                            <TextBlock x:Name="NormalRatingItem"
                                    Text="{StaticResource GlyphStarOutline}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    FontSize="{StaticResource RatingItemFontSize}"
                                    VerticalAlignment="Stretch"
                                    Foreground="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                            <TextBlock x:Name="ReadOnlyRatingItem"
                                    Opacity="0"
                                    Text="{StaticResource GlyphStar}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    FontSize="{StaticResource RatingItemFontSize}"
                                    VerticalAlignment="Stretch"
                                    Foreground="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding RatioVisible}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                                <TextBlock x:Name="MouseOverRatingItem"
                                        Text="{StaticResource GlyphStar}"
                                        FontFamily="{StaticResource TelerikWebUI}"
                                        FontSize="{StaticResource RatingItemFontSize}"
                                        Foreground="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            </telerikRating:LinearClipper>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding RatioVisible}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                                <TextBlock x:Name="SelectedRatingItem"
                                        Text="{StaticResource GlyphStar}"
                                        FontFamily="{StaticResource TelerikWebUI}"
                                        FontSize="{StaticResource RatingItemFontSize}"
                                        Foreground="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
                            </telerikRating:LinearClipper>
                            <TextBlock x:Name="DisabledRatingItemBackground"
                                    Opacity="0"
                                    Text="{StaticResource GlyphStar}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    FontSize="{StaticResource RatingItemFontSize}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Stretch"
                                    Foreground="{telerik1:Office2016Resource ResourceKey=AlternativeBrush}"/>
                            <TextBlock x:Name="DisabledRatingItemBorder"
                                    Opacity="0"
                                    Text="{StaticResource GlyphStarOutline}"
                                    FontFamily="{StaticResource TelerikWebUI}"
                                    FontSize="{StaticResource RatingItemFontSize}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Stretch"
                                    Foreground="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                            <telerikRating:LinearClipper x:Name="DisabledRatingItem" HorizontalContentAlignment="Center" RatioVisible="{TemplateBinding RatioVisible}" ExpandDirection="Right" Opacity="0">
                                <TextBlock
                                        Text="{StaticResource GlyphStar}"
                                        FontFamily="{StaticResource TelerikWebUI}"
                                        FontSize="{StaticResource RatingItemFontSize}"
                                        VerticalAlignment="Stretch"
                                        Foreground="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
                            </telerikRating:LinearClipper>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding ValueRatio}" ExpandDirection="Right" HorizontalContentAlignment="Center">
                                <TextBlock x:Name="SelectedUnHoveredRatingItem"
                                        Text="{StaticResource GlyphStarOutline}"
                                        FontFamily="{StaticResource TelerikWebUI}"
                                        FontSize="{StaticResource RatingItemFontSize}"
                                        VerticalAlignment="Stretch"
                                        Opacity="0"
                                        Foreground="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            </telerikRating:LinearClipper>
                        </Grid>
                        <ContentPresenter x:Name="Content"
                                Cursor="{TemplateBinding Cursor}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Grid.Row="1"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOverItem" Value="True">
                            <Setter Property="Opacity" TargetName="MouseOverRatingItem" Value="1"/>
                            <Setter Property="Opacity" TargetName="SelectedRatingItem" Value="0"/>
                            <Setter Property="Opacity" TargetName="SelectedUnHoveredRatingItem" Value="0"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="SelectedState">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="MouseOverRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="SelectedRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="SelectedUnHoveredRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="MouseOverRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="SelectedRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="SelectedUnHoveredRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="DisabledRatingItem" Value="1"/>
                            <Setter Property="Opacity" TargetName="DisabledRatingItemBackground" Value="1"/>
                            <Setter Property="Opacity" TargetName="DisabledRatingItemBorder" Value="1"/>
                            <Setter Property="Opacity" TargetName="NormalRatingItem" Value="0"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadRating" BasedOn="{StaticResource RadRatingStyle}"/>
    <Style TargetType="controls:RadRatingItem" BasedOn="{StaticResource RadRatingItemStyle}"/>
    <Style x:Key="TimeSpanPickerWatermarkTextBoxStyle" TargetType="telerik:RadWatermarkTextBox">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadWatermarkTextBox">
                    <Grid x:Name="RootElement">
                        <ScrollViewer x:Name="PART_ContentHost"
                                Background="Transparent"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                BorderThickness="0"
                                IsTabStop="False"
                                Padding="{TemplateBinding Padding}"/>
                        <ContentControl x:Name="WatermarkVisualElement"
                                IsTabStop="False"
                                FontStyle="Italic"
                                Content="{TemplateBinding WatermarkContent}"
                                ContentTemplate="{TemplateBinding WatermarkTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                IsHitTestVisible="False"
                                Visibility="Hidden"
                                Padding="{TemplateBinding Padding}">
                            <ContentControl.Template>
                                <ControlTemplate TargetType="ContentControl">
                                    <ContentPresenter Margin="{TemplateBinding Padding}"/>
                                </ControlTemplate>
                            </ContentControl.Template>
                        </ContentControl>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="WatermarkVisualElement" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsWatermarkVisible" Value="True">
                            <Setter TargetName="WatermarkVisualElement" Property="Visibility" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadTimeSpanPickerComponentTemplate" TargetType="controls:RadTimeSpanPickerComponent">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock
                    Text="{Binding Header, Converter={StaticResource TextToUpperCaseConverter}}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Foreground="{TemplateBinding Foreground}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontSize="{TemplateBinding FontSize}"
                    FontFamily="{TemplateBinding FontFamily}"
                    Margin="0 0 0 5"
                    Visibility="{Binding Header, Converter={StaticResource NullToVisibilityConverterInstance}}"/>
            <telerik:RadListBox Grid.Row="1" MinWidth="60" ItemsSource="{Binding ItemsSource}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
                <telerik:RadListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </telerik:RadListBox.ItemsPanel>
            </telerik:RadListBox>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadTimeSpanPickerComponentStyle" TargetType="controls:RadTimeSpanPickerComponent">
        <Setter Property="FontSize" Value="{telerik1:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentBrush}"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Margin" Value="2 5"/>
        <Setter Property="Template" Value="{StaticResource RadTimeSpanPickerComponentTemplate}"/>
    </Style>
    <ControlTemplate x:Key="RadTimeSpanPickerTemplate" TargetType="controls:RadTimeSpanPicker">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="2"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <telerik:RadWatermarkTextBox x:Name="PART_TimeSpanInput"
                    Text="{TemplateBinding TimeSpanText}"
                    WatermarkContent="{TemplateBinding TimeSpanWatermarkContent}"
                    WatermarkTemplate="{TemplateBinding TimeSpanWatermarkTemplate}"
                    TextAlignment="{TemplateBinding TextAlignment}"
                    TabIndex="0"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Background="{x:Null}"
                    BorderThickness="0"
                    BorderBrush="{x:Null}"
                    FontSize="{TemplateBinding FontSize}"
                    Padding="{TemplateBinding Padding}"
                    MinHeight="0"
                    Style="{StaticResource TimeSpanPickerWatermarkTextBoxStyle}"/>
            <Border x:Name="FocusVisual"
                    Opacity="0"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    MinHeight="{TemplateBinding MinHeight}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{x:Null}"
                    BorderBrush="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"
                    CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
            <telerik:RadDropDownButton
                    Grid.Column="1"
                    TabIndex="1"
                    FocusVisualStyle="{x:Null}"
                    x:Name="PART_DropDownButton"
                    PopupPlacementTarget="{Binding ElementName=PART_TimeSpanInput}"
                    IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    CloseOnEnter="False"
                    IsTabStop="False"
                    Padding="3 0 0 0"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Stretch"
                    telerik:DropDownButtonExtensions.FocusContentOnOpen="True"
                    Focusable="False">
                <telerik:RadDropDownButton.DropDownContent>
                    <Grid Margin="0 1 0 0" MaxHeight="{TemplateBinding MaxDropDownHeight}" Width="{TemplateBinding DropDownWidth}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="BackgroundVisual"
                                Grid.RowSpan="2"
                                IsHitTestVisible="False"
                                Background="{telerik1:Office2016Resource ResourceKey=MainBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{telerik1:Office2016Resource ResourceKey=CornerRadius}"/>
                        <ItemsControl
                                ItemContainerStyle="{TemplateBinding TimeSpanComponentStyle}"
                                ItemContainerStyleSelector="{TemplateBinding TimeSpanComponentStyleSelector}"
                                Padding="3 0"
                                Focusable="False"
                                Background="Transparent">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <DockPanel/>
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </ItemsControl>
                        <Border x:Name="ButtonsContainer" Grid.Row="1" BorderThickness="0 1 0 0" BorderBrush="{TemplateBinding BorderBrush}" Background="Transparent">
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                                <telerik:RadButton x:Name="PART_Clear"
                                        FocusVisualStyle="{x:Null}"
                                        HorizontalAlignment="Right"
                                        telerik:LocalizationManager.ResourceKey="Clear"
                                        Command="{x:Static controls:TimeSpanPickerCommands.Clear}"
                                        KeyboardNavigation.TabNavigation="Once"
                                        Margin="4 3 3 4"
                                        Padding="15 2"/>
                                <telerik:RadButton x:Name="PART_Close"
                                        HorizontalAlignment="Right"
                                        telerik:LocalizationManager.ResourceKey="Close"
                                        Command="{x:Static controls:TimeSpanPickerCommands.Close}"
                                        FocusVisualStyle="{x:Null}"
                                        KeyboardNavigation.TabNavigation="Once"
                                        Padding="15 2"
                                        Margin="0 3 5 4"/>
                            </StackPanel>
                        </Border>
                    </Grid>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Template>
                    <ControlTemplate TargetType="telerik:RadDropDownButton">
                        <Grid>
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <Popup x:Name="DropDownPopup"
                                    AllowsTransparency="True"
                                    StaysOpen="False"
                                    Focusable="false"
                                    Placement="Bottom"
                                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                                <ContentPresenter x:Name="DropDownPopupContent"
                                        Content="{TemplateBinding DropDownContent}"
                                        ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                            </Popup>
                        </Grid>
                    </ControlTemplate>
                </telerik:RadDropDownButton.Template>
                <Grid x:Name="DropDownIcon" Margin="0 1" Background="Transparent">
                    <TextBlock x:Name="TimeSpanPickerIcon"
                            Text="{StaticResource GlyphClock}"
                            FontFamily="{StaticResource TelerikWebUI}"
                            FontSize="16"
                            Foreground="{telerik1:Office2016Resource ResourceKey=IconBrush}"
                            Margin="0 0 4 0"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"/>
                </Grid>
            </telerik:RadDropDownButton>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                <Setter TargetName="TimeSpanPickerIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="TimeSpanPickerIcon" Property="Opacity" Value="{telerik1:Office2016Resource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:Office2016Resource ResourceKey=PrimaryBrush}"/>
            </Trigger>
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter TargetName="FocusVisual" Property="Opacity" Value="1"/>
                <Setter TargetName="TimeSpanPickerIcon" Property="Foreground" Value="{telerik1:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadTimeSpanPickerStyle" TargetType="controls:RadTimeSpanPicker">
        <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="MinHeight" Value="26"/>
        <Setter Property="Padding" Value="4 2"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MaxDropDownHeight" Value="200"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="KeyboardNavigation.ControlTabNavigation" Value="Cycle"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="True"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="Template" Value="{StaticResource RadTimeSpanPickerTemplate}"/>
    </Style>
    <Style TargetType="controls:RadTimeSpanPicker" BasedOn="{StaticResource RadTimeSpanPickerStyle}"/>
    <Style TargetType="controls:RadTimeSpanPickerComponent" BasedOn="{StaticResource RadTimeSpanPickerComponentStyle}"/>
</ResourceDictionary>
