<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:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:ext="clr-namespace:Telerik.Windows.Controls.MarkupExtensions;assembly=Telerik.Windows.Controls"
        xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
        xmlns:helpers="clr-namespace:Telerik.Windows.Controls.Theming.Helpers;assembly=Telerik.Windows.Controls"
        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:FluentResourceDictionary/>
    </ResourceDictionary.MergedDictionaries>
    <telerik1:ColorToBrushConverter x:Key="converter"/>
    <telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <telerik1:InvertedBooleanConverter x:Key="InvertedBooleanConverter"/>
    <telerik1:LocalizationManager x:Key="localizationManagerProvider"/>
    <telerik1:ThicknessToOrientedThicknessConverter x:Key="ThicknessToOrientedThicknessConverter"/>
    <telerik1:CornerRadiusConverter x:Key="CornerRadiusConverter"/>
    <telerik1:OpacityConverter x:Key="OpacityConverter"/>
    <telerik1:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
    <Geometry x:Key="ArrowTopRight8x8">M0,0 L8,0 8,8 z</Geometry>
    <sys:String x:Key="GlyphArrowChevronUp"></sys:String>
    <sys:String x:Key="GlyphArrowChevronRight"></sys:String>
    <sys:String x:Key="GlyphArrowChevronDown"></sys:String>
    <sys:String x:Key="GlyphArrowChevronLeft"></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="GlyphZoom"></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>
    <telerik1:ColorToBrushConverter x:Key="ColorToBrushConverter"/>
    <ext:DynamicResourceProxy x:Key="PrimaryBackgroundBrushProxy" ProxyValue="{Binding Source={x:Static telerik1:FluentPalette.Palette}, Path=PrimaryBackgroundColor, Converter={StaticResource ColorToBrushConverter}}"/>
    <ext:DynamicResourceProxy x:Key="AlternativeBrushProxy" ProxyValue="{Binding Source={x:Static telerik1:FluentPalette.Palette}, Path=AlternativeColor, Converter={StaticResource ColorToBrushConverter}}"/>
    <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:FluentResource ResourceKey=ValidationBrush}" Margin="1 0 0 0" UseLayoutRounding="True">
                <ContentPresenter
                        Content="{Binding ErrorContent}"
                        Margin="10 6"
                        TextBlock.Foreground="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"
                        TextBlock.FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                        VerticalAlignment="Center"/>
            </Border>
            <ContentControl/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="StaticValidationTooltipTemplate">
        <StackPanel Orientation="Horizontal">
            <Grid SnapsToDevicePixels="True" VerticalAlignment="Top">
                <AdornedElementPlaceholder x:Name="Holder"/>
                <Border BorderBrush="{telerik1:FluentResource ResourceKey=ValidationBrush}" BorderThickness="1" CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
            </Grid>
            <Grid>
                <Border Background="{telerik1:FluentResource ResourceKey=ValidationBrush}" Margin="1 0 0 0" SnapsToDevicePixels="True">
                    <TextBlock x:Name="PART_ToolTip"
                            FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                            FontFamily="{telerik1:FluentResource ResourceKey=FontFamily}"
                            Foreground="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"
                            Padding="10 6"
                            Text="{Binding ElementName=Holder, Path=AdornedElement.(Validation.Errors).CurrentItem.ErrorContent}"/>
                </Border>
            </Grid>
        </StackPanel>
    </ControlTemplate>
    <ControlTemplate x:Key="ValidationTooltipTemplate">
        <Grid SnapsToDevicePixels="True" VerticalAlignment="Top">
            <AdornedElementPlaceholder x:Name="Holder"/>
            <Border BorderBrush="{telerik1:FluentResource ResourceKey=ValidationBrush}" BorderThickness="1" CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
            <Path
                    Data="{StaticResource ArrowTopRight8x8}"
                    Fill="{telerik1:FluentResource ResourceKey=ValidationBrush}"
                    Width="8"
                    Height="8"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    Margin="0 1 1 0"/>
            <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>
    <telerikMaskedInput:HorizontalContentAlignmentToTextAlignmentConverter x:Key="HorizontalContentAlignmentToTextAlignmentConverter"/>
    <telerikMaskedInput:HorizontalContentAlignmentToTextAlignmentConverter x:Key="conv"/>
    <telerik:NullToVisibilityConverter x:Key="NullToVisibilityConverterInstance"/>
    <Thickness x:Key="CalendarButtonMargin">1</Thickness>
    <Thickness x:Key="CalendarViewBorderThickness">2 0</Thickness>
    <Thickness x:Key="CalendarViewHeaderPadding">5</Thickness>
    <Thickness x:Key="CalendarViewMargin">0</Thickness>
    <Thickness x:Key="CalendarViewHeaderMargin">0</Thickness>
    <Thickness x:Key="CalendarItemsMargin">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">10 0</Thickness>
    <Thickness x:Key="CalendarTransitionPanelMargin">0</Thickness>
    <Thickness x:Key="ClockItemPadding">10 5</Thickness>
    <Thickness x:Key="ClockItemsPresenterMargin">1</Thickness>
    <Thickness x:Key="ClockItemsMargin">1</Thickness>
    <sys:Double x:Key="ColorEditor_Label_MinWidth">15</sys:Double>
    <sys:Double x:Key="ColorEditor_Input_MinWidth">80</sys:Double>
    <Thickness x:Key="ColorEditor_Input_Margin">0 2 10 3</Thickness>
    <sys:Double x:Key="GlyphArrowSize">14</sys:Double>
    <sys:Double x:Key="PadWidthHeight">36</sys:Double>
    <Thickness x:Key="ColorModesGridMargin">10 0 0 0</Thickness>
    <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <Border x:Name="FocusVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                Background="{x:Null}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <mat:FluentControl
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                EffectMode="Glow"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsSmartClipped="True">
                            <ContentPresenter x:Name="Content"
                                    Focusable="False"
                                    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"/>
                        </mat:FluentControl>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocused" Value="True"/>
                                <Condition Property="IsPressed" Value="False"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" Value="Visible" TargetName="FocusVisual"/>
                        </MultiTrigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Self}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource Self}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Self}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource Self}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsKeyboardFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                        </MultiTrigger>

                        <!-- disabled -->
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
    <Style x:Key="RadButtonStyle" TargetType="telerik1:RadButton">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <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="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <Border x:Name="FocusVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <mat:FluentControl
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch">
                            <ContentPresenter x:Name="Content"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    RecognizesAccessKey="True"
                                    Focusable="False"
                                    TextBlock.Foreground="{TemplateBinding Foreground}"
                                    Margin="{TemplateBinding Padding}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </mat:FluentControl>
                    </Grid>
                    <ControlTemplate.Triggers>

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

                        <!-- General IsKeyboardFocused setters -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsKeyboardFocused" Value="True"/>
                                <Condition Property="IsPressed" Value="False"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
                        </MultiTrigger>

                        <!-- general setters for IsMouseOver -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- general setters for IsPressed -->
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- disabled -->
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                        </Trigger>

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

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadButton" BasedOn="{StaticResource RadButtonStyle}"/>
    <Style x:Key="RadToggleButtonStyle" TargetType="telerik1:RadToggleButton">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <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 x:Name="BorderVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <Border x:Name="FocusVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                Background="{x:Null}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <mat:FluentControl
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                VerticalAlignment="Stretch"
                                HorizontalAlignment="Stretch"
                                IsSmartClipped="True">
                            <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"/>
                        </mat:FluentControl>
                    </Grid>
                    <ControlTemplate.Triggers>

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

                        <!-- general setters for IsChecked -->
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>

                        <!-- general setters for IsKeyboardFocused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocused" Value="True"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                                <Condition Property="IsPressed" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
                        </MultiTrigger>

                        <!-- General setters for IsMouseOver -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- General setters for IsPressed -->
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- disabled -->
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                        </Trigger>

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

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadToggleButton" BasedOn="{StaticResource RadToggleButtonStyle}"/>
    <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="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"/>
        <Setter Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=BottomLeftTop}"/>
    </Style>
    <Style x:Key="SplitToggleButtonStyle" TargetType="telerik1:RadToggleButton" BasedOn="{StaticResource RadToggleButtonStyle}">
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush)}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{x:Null}"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=BottomRightTop}"/>
        <Setter Property="Background" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="FontSize" Value="{Binding FontSize, RelativeSource={RelativeSource TemplatedParent}}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="Focusable" Value="False"/>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
                <Setter Property="mat:MaterialAssist.FocusBrush" Value="{x:Null}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="RadSplitButtonStyle" TargetType="telerik1:RadSplitButton">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
        <Setter Property="ButtonPartStyle" Value="{StaticResource SplitButtonPartStyle}"/>
        <Setter Property="TogglePartStyle" Value="{StaticResource SplitToggleButtonStyle}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <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">
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{x:Null}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                Background="{x:Null}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                IsHitTestVisible="False"/>
                        <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"
                                    Grid.Row="1"
                                    Grid.Column="1"
                                    Style="{TemplateBinding ButtonPartStyle}"
                                    ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"/>
                            <Rectangle x:Name="Separator"
                                    MinWidth="1"
                                    MinHeight="1"
                                    Fill="{TemplateBinding BorderBrush}"
                                    VerticalAlignment="Stretch"
                                    HorizontalAlignment="Right"
                                    Stroke="{x:Null}"
                                    StrokeThickness="0"
                                    Grid.Row="1"
                                    Grid.Column="1"/>
                            <telerik1:RadToggleButton x:Name="DropDownPart"
                                    Grid.Row="1"
                                    Grid.Column="2"
                                    IsChecked="{Binding Path=IsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                    Style="{TemplateBinding TogglePartStyle}"
                                    IsBackgroundVisible="{TemplateBinding IsBackgroundVisible}"
                                    Visibility="{TemplateBinding DropDownIndicatorVisibility}">
                                <telerik1:RadToggleButton.Content>
                                    <telerik1:RadGlyph x:Name="arrow" Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type telerik1:RadToggleButton}}}" Glyph="{StaticResource GlyphArrowChevronDown}"/>
                                </telerik1:RadToggleButton.Content>
                            </telerik1:RadToggleButton>
                        </Grid>
                        <Border x:Name="FocusVisual"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                Grid.Row="1"
                                Grid.Column="2"
                                Background="{x:Null}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        <Popup x:Name="DropDownPopup"
                                AllowsTransparency="True"
                                StaysOpen="False"
                                Focusable="False"
                                Placement="Bottom"
                                PopupAnimation="{TemplateBinding PopupAnimation}"
                                HorizontalOffset="0"
                                VerticalOffset="0">
                            <Grid Margin="3 0 3 3" x:Name="PopupGrid">
                                <mat:Shadow x:Name="PopupShadow"
                                        ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"
                                        Height="{TemplateBinding DropDownHeight}"
                                        Width="{TemplateBinding DropDownWidth}"
                                        CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"
                                        SnapsToDevicePixels="True"
                                        BorderBrush="{x:Null}"
                                        Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                                <Border x:Name="DropDownPopupBorder"
                                        MinWidth="3"
                                        MinHeight="3"
                                        BorderThickness="0"
                                        Width="{TemplateBinding DropDownWidth}"
                                        Height="{TemplateBinding DropDownHeight}"
                                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                        MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                        Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                                        BorderBrush="{telerik1:FluentResource ResourceKey=BasicBrush}"
                                        CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}">
                                    <ContentControl x:Name="DropDownPopupContent"
                                            Content="{TemplateBinding DropDownContent}"
                                            ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                            HorizontalContentAlignment="Stretch"
                                            VerticalContentAlignment="Stretch"
                                            HorizontalAlignment="Stretch"
                                            VerticalAlignment="Stretch"
                                            DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                                </Border>
                            </Grid>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>

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

                        <!-- focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsOpen" Value="False"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                                <Condition Property="IsKeyboardFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
                        </MultiTrigger>

                        <!-- disabled and focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsFocused" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                        </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:FluentResource ResourceKey=MarkerBrush}"/>
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- opened -->
                        <Trigger Property="IsOpen" Value="True">
                            <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                            <Setter TargetName="ButtonPart" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter TargetName="ButtonPart" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter TargetName="Separator" Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter TargetName="DropDownPart" Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronUp}"/>
                        </Trigger>

                        <!-- IsToggle = True && checked -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="True"/>
                                <Condition Property="IsToggle" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="ButtonPart" Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="ButtonPart" Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
                            <Setter TargetName="ButtonPart" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter TargetName="ButtonPart" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter TargetName="Separator" Property="Fill" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                        </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="FocusVisual" Property="Grid.Column" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Row" Value="2"/>
                            <Setter TargetName="Separator" Property="HorizontalAlignment" Value="Stretch"/>
                            <Setter TargetName="Separator" Property="VerticalAlignment" Value="Bottom"/>
                            <Setter TargetName="DropDownPart" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomLeft}"/>
                            <Setter TargetName="ButtonPart" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightTopLeft}"/>
                            <Setter TargetName="ButtonPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"/>
                            <Setter TargetName="DropDownPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Left">
                            <Setter TargetName="DropDownPart" Property="Grid.Column" Value="0"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Column" Value="0"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="Separator" Property="HorizontalAlignment" Value="Left"/>
                            <Setter TargetName="Separator" Property="VerticalAlignment" Value="Stretch"/>
                            <Setter TargetName="DropDownPart" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=BottomLeftTop}"/>
                            <Setter TargetName="ButtonPart" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=BottomRightTop}"/>
                            <Setter TargetName="ButtonPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTopBottom}"/>
                            <Setter TargetName="DropDownPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=LeftTopBottom}"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Top">
                            <Setter TargetName="DropDownPart" Property="Grid.Column" Value="1"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Row" Value="0"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Column" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Row" Value="0"/>
                            <Setter TargetName="Separator" Property="HorizontalAlignment" Value="Stretch"/>
                            <Setter TargetName="Separator" Property="VerticalAlignment" Value="Top"/>
                            <Setter TargetName="DropDownPart" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightTopLeft}"/>
                            <Setter TargetName="ButtonPart" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=RightBottomLeft}"/>
                            <Setter TargetName="ButtonPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=BottomLeftRight}"/>
                            <Setter TargetName="DropDownPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopLeftRight}"/>
                        </Trigger>
                        <Trigger Property="DropDownButtonPosition" Value="Right">
                            <Setter TargetName="DropDownPart" Property="Grid.Column" Value="2"/>
                            <Setter TargetName="DropDownPart" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Column" Value="2"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="Separator" Property="HorizontalAlignment" Value="Right"/>
                            <Setter TargetName="Separator" Property="VerticalAlignment" Value="Stretch"/>
                            <Setter TargetName="ButtonPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=LeftTopBottom}"/>
                            <Setter TargetName="DropDownPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=RightTopBottom}"/>
                        </Trigger>

                        <!-- ButtonPartVisibility - Hidden -->
                        <Trigger Property="IsButtonPartVisible" Value="False">
                            <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="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius)}"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Row" Value="0"/>
                            <Setter TargetName="FocusVisual" Property="Grid.RowSpan" Value="3"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Column" Value="0"/>
                            <Setter TargetName="FocusVisual" Property="Grid.ColumnSpan" Value="3"/>
                            <Setter TargetName="ButtonPart" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="Separator" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="DropDownPart" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness}"/>
                        </Trigger>

                        <!-- DropDownIndicatorVisibility - Hidden -->
                        <Trigger Property="DropDownIndicatorVisibility" Value="Collapsed">
                            <Setter TargetName="Separator" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="ButtonPart" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius)}"/>
                            <Setter TargetName="ButtonPart" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness}"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Row" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Grid.Column" Value="1"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Bottom"/>
                        <Trigger Property="DropDownPlacement" Value="Top">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronUp}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="3 3 3 0"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Left">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronLeft}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="3 3 0 3"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Right">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronRight}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="0 3 3 3"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="DropDownPlacement" Value="Left"/>
                                <Condition Property="IsOpen" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronRight}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="DropDownPlacement" Value="Top"/>
                                <Condition Property="IsOpen" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronDown}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="DropDownPlacement" Value="Right"/>
                                <Condition Property="IsOpen" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronLeft}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadSplitButton" BasedOn="{StaticResource RadSplitButtonStyle}"/>
    <Style x:Key="RadDropDownButtonStyle" TargetType="telerik1:RadDropDownButton">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="DropDownMinHeight" Value="3"/>
        <Setter Property="DropDownMinWidth" Value="3"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <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>
                        <Border x:Name="BorderVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <Border x:Name="FocusVisual"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                Background="{x:Null}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <mat:FluentControl
                                IsSmartClipped="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                HorizontalContentAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <ContentPresenter x:Name="Content"
                                        Grid.Row="1"
                                        Grid.Column="1"
                                        TextBlock.Foreground="{TemplateBinding Foreground}"
                                        Margin="{TemplateBinding Padding}"
                                        Content="{TemplateBinding Content}"
                                        ContentTemplate="{TemplateBinding ContentTemplate}"
                                        VerticalAlignment="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik1:RadDropDownButton}},Path=VerticalContentAlignment}"
                                        HorizontalAlignment="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik1:RadDropDownButton}},Path= HorizontalContentAlignment}"
                                        ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                        ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                        RecognizesAccessKey="True"/>
                                <Grid x:Name="DropDownIndicator"
                                        IsHitTestVisible="False"
                                        Grid.Column="1"
                                        Grid.Row="2"
                                        HorizontalAlignment="Center"
                                        Canvas.ZIndex="2"
                                        VerticalAlignment="Center"
                                        Visibility="{TemplateBinding DropDownIndicatorVisibility}"
                                        Margin="5">
                                    <telerik1:RadGlyph x:Name="arrow" Foreground="{telerik1:FluentResource ResourceKey=IconBrush}" Glyph="{StaticResource GlyphArrowChevronDown}"/>
                                </Grid>
                            </Grid>
                        </mat:FluentControl>
                        <Popup x:Name="DropDownPopup"
                                AllowsTransparency="True"
                                StaysOpen="False"
                                Focusable="False"
                                Placement="Bottom"
                                PopupAnimation="{TemplateBinding PopupAnimation}"
                                HorizontalOffset="0"
                                VerticalOffset="0">
                            <Grid x:Name="PopupGrid" Margin="3 0 3 3">
                                <mat:Shadow x:Name="PopupShadow"
                                        ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"
                                        SnapsToDevicePixels="True"
                                        BorderBrush="Transparent"
                                        BorderThickness="0"
                                        Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                                        CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"/>
                                <Border x:Name="DropDownPopupBorder"
                                        BorderThickness="0"
                                        MinWidth="{TemplateBinding DropDownMinWidth}"
                                        MinHeight="{TemplateBinding DropDownMinHeight}"
                                        Width="{TemplateBinding DropDownWidth}"
                                        Height="{TemplateBinding DropDownHeight}"
                                        MaxWidth="{TemplateBinding DropDownMaxWidth}"
                                        MaxHeight="{TemplateBinding DropDownMaxHeight}"
                                        Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                                        BorderBrush="Transparent"
                                        CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}">
                                    <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>
                            </Grid>
                        </Popup>
                    </Grid>
                    <ControlTemplate.Triggers>

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

                        <!-- General IsKeyboardFocused setters -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True"/>
                                <Condition Property="IsKeyboardFocused" Value="True"/>
                                <Condition Property="IsPressed" Value="False"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
                        </MultiTrigger>

                        <!-- General setters for IsMouseOver -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- General setters for IsPressed -->
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- General setters for IsOpen -->
                        <Trigger Property="IsOpen" Value="True">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronUp}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter Property="Visibility" TargetName="FocusVisual" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="PopupShadow" Value="Visible"/>
                            <Setter Property="Background" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- disabled -->
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter TargetName="DropDownIndicator" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>

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

                        <!-- disabled & background is hidden -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="False"/>
                                <Condition Property="IsBackgroundVisible" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </MultiTrigger>

                        <!-- DropDownButtonPosition and DropDownPacement -->
                        <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="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronUp}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="3 3 3 0"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Left">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronLeft}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="3 3 0 3"/>
                        </Trigger>
                        <Trigger Property="DropDownPlacement" Value="Right">
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronRight}"/>
                            <Setter TargetName="PopupShadow" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                            <Setter TargetName="DropDownPopupBorder" Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                            <Setter TargetName="PopupGrid" Property="Margin" Value="0 3 3 3"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsOpen" Value="True"/>
                                <Condition Property="DropDownPlacement" Value="Top"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronDown}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsOpen" Value="True"/>
                                <Condition Property="DropDownPlacement" Value="Left"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronRight}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsOpen" Value="True"/>
                                <Condition Property="DropDownPlacement" Value="Right"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="arrow" Property="Glyph" Value="{StaticResource GlyphArrowChevronLeft}"/>
                            <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="telerik1:RadDropDownButton" BasedOn="{StaticResource RadDropDownButtonStyle}"/>
    <Style x:Key="CalculatorHistoryDisplay_Style" TargetType="TextBox">
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="24 8 8 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:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="FontSize" Value="20"/>
        <Setter Property="Margin" Value="0 0 8 8"/>
        <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:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CalculatorButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="CornerRadius" Value="0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSizeL}"/>
        <Setter Property="MinHeight" Value="44"/>
        <Setter Property="MinWidth" Value="44"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="Margin" Value="1"/>
        <Setter Property="Padding" Value="0 5"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
    </Style>
    <Style x:Key="CalculatorAlternateButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="CornerRadius" Value="0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{Binding Source={StaticResource PrimaryBackgroundBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=102}"/>
        <Setter Property="BorderBrush" Value="{Binding Source={StaticResource PrimaryBackgroundBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=102}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSizeL}"/>
        <Setter Property="MinHeight" Value="44"/>
        <Setter Property="MinWidth" Value="44"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="Margin" Value="1"/>
        <Setter Property="Padding" Value="0 5"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
    </Style>
    <Style x:Key="CalculatorMemoryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="IsBackgroundVisible" Value="False"/>
        <Setter Property="CornerRadius" Value="0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="MinWidth" Value="44"/>
        <Setter Property="Margin" Value="1 3"/>
        <Setter Property="Padding" Value="0 5"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
    </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:FluentResource ResourceKey=CornerRadius}"
                    SnapsToDevicePixels="True">
                <Grid x:Name="Root" Margin="{TemplateBinding Padding}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Border MinHeight="90" Background="{x:Null}" BorderBrush="{x:Null}" Margin="0" 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"
                                    AutomationProperties.Name="DisplayTextBox"
                                    Grid.Row="1"
                                    Grid.ColumnSpan="2"
                                    Text="{Binding DisplayedValue, RelativeSource={RelativeSource TemplatedParent}}"
                                    Style="{StaticResource CalculatorDisplayValue_Style}"
                                    Foreground="{TemplateBinding Foreground}"/>
                            <Canvas>
                                <TextBlock x:Name="MemoryIndicatorTextBox"
                                        Text="M"
                                        Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsMemoryUpdated, Converter={StaticResource BooleanToVisibilityConverter}}"
                                        VerticalAlignment="Top"
                                        FontSize="{telerik1:FluentResource ResourceKey=FontSize}"
                                        Margin="8 8 0 0"/>
                            </Canvas>
                            <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>
                        <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}"
                                Style="{StaticResource CalculatorAlternateButtonStyle}"/>
                        <telerik:RadButton x:Name="ClearInput_Button"
                                Content="CE"
                                Grid.Row="1"
                                Grid.Column="1"
                                Command="{x:Static controls:RadCalculatorCommands.ClearInput}"
                                Style="{StaticResource CalculatorAlternateButtonStyle}"/>
                        <telerik:RadButton x:Name="ClearEverything_Button"
                                Content="C"
                                Grid.Row="1"
                                Grid.Column="2"
                                Command="{x:Static controls:RadCalculatorCommands.ClearEverything}"
                                Style="{StaticResource CalculatorAlternateButtonStyle}"/>
                        <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}"
                                Style="{StaticResource CalculatorAlternateButtonStyle}"/>
                        <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}"
                                Style="{StaticResource CalculatorAlternateButtonStyle}"/>
                        <telerik:RadButton x:Name="input7_Button" Content="7" Grid.Row="2" Grid.Column="0" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" CommandParameter="7"/>
                        <telerik:RadButton x:Name="input8_Button" Content="8" Grid.Row="2" Grid.Column="1" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" CommandParameter="8"/>
                        <telerik:RadButton x:Name="input9_Button" Content="9" Grid.Row="2" Grid.Column="2" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" 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}"
                                Style="{StaticResource CalculatorAlternateButtonStyle}"/>
                        <telerik:RadButton x:Name="input4_Button" Content="4" Grid.Row="3" Grid.Column="0" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" CommandParameter="4"/>
                        <telerik:RadButton x:Name="input5_Button" Content="5" Grid.Row="3" Grid.Column="1" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" CommandParameter="5"/>
                        <telerik:RadButton x:Name="input6_Button" Content="6" Grid.Row="3" Grid.Column="2" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" 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}"
                                Style="{StaticResource CalculatorAlternateButtonStyle}"/>
                        <telerik:RadButton x:Name="input1_Button" Content="1" Grid.Row="4" Grid.Column="0" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" CommandParameter="1"/>
                        <telerik:RadButton x:Name="input2_Button" Content="2" Grid.Row="4" Grid.Column="1" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" CommandParameter="2"/>
                        <telerik:RadButton x:Name="input3_Button" Content="3" Grid.Row="4" Grid.Column="2" Command="{x:Static controls:RadCalculatorCommands.UpdateInput}" 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}"
                                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}"
                                Style="{StaticResource CalculatorAlternateButtonStyle}"/>
                    </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:FluentResource ResourceKey=DisabledOpacity}"/>
                <Setter Property="Opacity" TargetName="HistoryTextBox" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadCalculatorStyle" TargetType="controls:RadCalculator">
        <Setter Property="Template" Value="{StaticResource RadCalculatorTemplate}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <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="CalculatorAlternateButtonStyle" BasedOn="{StaticResource CalculatorAlternateButtonStyle}"/>
            <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="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="SelectionBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="ReadOnlyBackground" Value="{telerik1:FluentResource ResourceKey=ReadOnlyBackgroundBrush}"/>
        <Setter Property="DisabledBackground" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <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:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadWatermarkTextBox">
                    <Grid x:Name="RootElement">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="BorderVisual"
                                Grid.ColumnSpan="2"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <Border x:Name="ReadOnlyVisual"
                                Grid.ColumnSpan="2"
                                Background="{TemplateBinding ReadOnlyBackground}"
                                BorderBrush="{telerik1:FluentResource ResourceKey=ReadOnlyBorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                IsHitTestVisible="False"
                                Visibility="Collapsed"/>
                        <Border x:Name="FocusVisual"
                                Grid.ColumnSpan="2"
                                Background="{x:Null}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                IsHitTestVisible="False"
                                Visibility="Collapsed"/>
                        <ScrollViewer x:Name="PART_ContentHost"
                                Background="Transparent"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                BorderThickness="0"
                                IsTabStop="False"
                                Margin="1"
                                Padding="{TemplateBinding Padding}"
                                Opacity="{telerik1:FluentResource ResourceKey=InputOpacity}"
                                mat:MaterialAssist.CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <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}"
                                Opacity="{telerik1:FluentResource ResourceKey=InputOpacity}"
                                Visibility="Hidden">
                            <ContentControl.Template>
                                <ControlTemplate TargetType="ContentControl">
                                    <ContentPresenter Margin="{TemplateBinding Padding}"/>
                                </ControlTemplate>
                            </ContentControl.Template>
                        </ContentControl>
                        <ContentPresenter x:Name="AdditionalContentHost" Grid.Column="1" Content="{TemplateBinding AdditionalContent}" ContentTemplate="{TemplateBinding AdditionalContentTemplate}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                            <Setter TargetName="PART_ContentHost" Property="Opacity" Value="1"/>
                            <Setter TargetName="WatermarkVisualElement" Property="Opacity" Value="1"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>
                        <Trigger Property="IsReadOnly" Value="True">
                            <Setter Property="BorderThickness" Value="{telerik1:FluentResource ResourceKey=FocusThickness}"/>
                            <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=ReadOnlyOpacity}"/>
                            <Setter TargetName="WatermarkVisualElement" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=ReadOnlyOpacity}"/>
                            <Setter TargetName="ReadOnlyVisual" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisabledBackground}"/>
                            <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="WatermarkVisualElement" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsWatermarkVisible" Value="True">
                            <Setter TargetName="WatermarkVisualElement" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="PART_ContentHost" Property="Opacity" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="WatermarkBehavior" Value="HideOnTextEntered">
                            <Setter TargetName="WatermarkVisualElement" Property="Margin" Value="4 0 0 0"/>
                        </Trigger>

                        <!-- Invalid -->
                        <Trigger Property="Validation.HasError" Value="True">
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </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="25"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="ToggleButtonBackground"
                    Grid.ColumnSpan="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding CornerRadius}"/>
            <telerik:RadGlyph
                    Grid.Column="1"
                    x:Name="DropDownIcon"
                    FontSize="16"
                    Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"
                    Glyph="{StaticResource GlyphArrowChevronDown}"/>
            <Grid Grid.Column="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>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Glyph" TargetName="DropDownIcon" Value="{StaticResource GlyphArrowChevronUp}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="Content" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                <Setter Property="Opacity" TargetName="DropDownIcon" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="NonEditableComboToggleButtonStyle" TargetType="telerik:RadToggleButton">
        <Setter Property="MinHeight" Value="0"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="Template" Value="{StaticResource NonEditableComboToggleButtonControlTemplate}"/>
    </Style>
    <Style x:Key="EditableComboToggleButtonStyle" TargetType="telerik:RadToggleButton" BasedOn="{StaticResource RadToggleButtonStyle}">
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{x:Null}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusRight}"/>
        <Setter Property="MinWidth" Value="27"/>
        <Setter Property="MinHeight" Value="0"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="BorderThickness" Value="1 0 0 0"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
                <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                <Setter Property="mat:MaterialAssist.FocusBrush" Value="{x:Null}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ComboBoxTextBoxStyle" TargetType="TextBox">
        <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
        <Setter Property="helpers:ThemeHelper.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
        <Setter Property="helpers:ThemeHelper.FocusBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="SelectionBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="CaretBrush" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Margin" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"/>
    </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}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
            <TextBox x:Name="PART_EditableTextBox"
                    AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                    AutomationProperties.HelpText="{TemplateBinding AutomationProperties.HelpText}"
                    AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}"
                    TabIndex="{TemplateBinding TabIndex}"
                    Grid.Column="0"
                    Padding="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    Focusable="{TemplateBinding Focusable}"
                    Style="{StaticResource ComboBoxTextBoxStyle}">
                <TextBox.Template>
                    <ControlTemplate TargetType="TextBox">
                        <Grid>
                            <Border x:Name="BorderVisual"
                                    Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding helpers:ThemeHelper.CornerRadius}"/>
                            <ScrollViewer x:Name="PART_ContentHost"
                                    Background="Transparent"
                                    BorderBrush="Transparent"
                                    BorderThickness="0"
                                    IsTabStop="False"
                                    Opacity="{telerik1:FluentResource ResourceKey=InputOpacity}"
                                    VerticalScrollBarVisibility="Auto"
                                    VerticalContentAlignment="Stretch"
                                    Padding="{TemplateBinding Padding}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="PART_ContentHost" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.MouseOverBrush), Mode=OneWay}"/>
                                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                                <Setter TargetName="PART_ContentHost" Property="Opacity" Value="1"/>
                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="True">
                                <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(helpers:ThemeHelper.FocusBrush), Mode=OneWay}"/>
                                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                                <Setter TargetName="PART_ContentHost" Property="Opacity" Value="1"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </TextBox.Template>
            </TextBox>
            <telerik:RadToggleButton x:Name="PART_DropDownButton"
                    Grid.Column="1"
                    IsTabStop="False"
                    Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Style="{StaticResource EditableComboToggleButtonStyle}"
                    ClickMode="Press">
                <telerik:RadGlyph x:Name="DropDownIcon"
                        FontSize="16"
                        Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Margin="5 0"
                        Glyph="{StaticResource GlyphArrowChevronDown}"/>
            </telerik:RadToggleButton>
            <Border x:Name="FocusVisual"
                    Grid.ColumnSpan="2"
                    IsHitTestVisible="False"
                    BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                    Visibility="Collapsed"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
            <TextBlock x:Name="Watermark"
                    Opacity="{telerik1:FluentResource ResourceKey=InputOpacity}"
                    Text="{TemplateBinding EmptyText}"
                    IsHitTestVisible="False"
                    Padding="{TemplateBinding Padding}"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Left"
                    Visibility="Collapsed"
                    Foreground="{Binding ElementName=PART_EditableTextBox, Path=Foreground, Mode=OneWay}"/>
            <Popup x:Name="PART_Popup" VerticalOffset="0">
                <Grid x:Name="PopupRoot" Margin="5 0 5 5">
                    <mat:Shadow CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                    <Border x:Name="PART_ResizeBorder"
                            Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <telerik:RadButton x:Name="PART_ClearButton"
                                    Grid.Row="0"
                                    BorderThickness="0 0 0 1"
                                    CornerRadius="0"
                                    Margin="0"
                                    FontSize="{TemplateBinding FontSize}"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    Visibility="{TemplateBinding ClearSelectionButtonVisibility}"
                                    Content="{TemplateBinding ClearSelectionButtonContent}"/>
                            <ScrollViewer x:Name="PART_ScrollViewer"
                                    Grid.Row="1"
                                    BorderThickness="0"
                                    Margin="1 0 1 1"
                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                    Foreground="{TemplateBinding Foreground}"
                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                    CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="Watermark" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True" SourceName="Watermark">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsWatermarkVisible" Value="True">
                <Setter TargetName="Watermark" Property="Visibility" Value="Visible"/>
            </Trigger>

            <!-- IsKeyboardFocusWithin -->
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="IsDropDownOpen" Value="False"/>
                    <Condition Property="IsMouseOver" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                <Setter Property="Glyph" TargetName="DropDownIcon" Value="{StaticResource GlyphArrowChevronUp}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <ControlTemplate x:Key="NonEditableComboBox" TargetType="controls:RadComboBox">
        <Grid x:Name="VisualRoot">
            <Border x:Name="BackgroundVisual"
                    IsHitTestVisible="False"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
            <mat:FluentControl x:Name="Fluent"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    IsSmartClipped="True"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    VerticalContentAlignment="Stretch"
                    HorizontalContentAlignment="Stretch"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}">
                <telerik:RadToggleButton x:Name="PART_DropDownButton"
                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                        Padding="{TemplateBinding Padding}"
                        Content="{TemplateBinding SelectionBoxItem}"
                        ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        Style="{StaticResource NonEditableComboToggleButtonStyle}"
                        CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                        FontFamily="{TemplateBinding FontFamily}"
                        FontSize="{TemplateBinding FontSize}"
                        Focusable="{TemplateBinding Focusable}"/>
            </mat:FluentControl>
            <Border x:Name="FocusVisual"
                    IsHitTestVisible="False"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    Visibility="Collapsed"
                    Background="{x:Null}"
                    BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
            <Popup x:Name="PART_Popup" VerticalOffset="0">
                <Grid x:Name="PopupRoot" Margin="5 0 5 5">
                    <mat:Shadow
                            CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"
                            SnapsToDevicePixels="True"
                            Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                            ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
                    <Border x:Name="PART_ResizeBorder"
                            SnapsToDevicePixels="True"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                            Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <telerik:RadButton x:Name="PART_ClearButton"
                                    Grid.Row="0"
                                    CornerRadius="0"
                                    BorderThickness="0 0 0 1"
                                    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/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>

            <!-- IsKeyboardFocusWithin -->
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="IsDropDownOpen" Value="False"/>
                    <Condition Property="IsMouseOver" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" TargetName="BackgroundVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                <Setter Property="BorderBrush" TargetName="BackgroundVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True" SourceName="Fluent">
                <Setter Property="Background" TargetName="BackgroundVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                <Setter Property="BorderBrush" TargetName="BackgroundVisual" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
            </Trigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadComboBoxItemStyle" TargetType="controls:RadComboBoxItem">
        <Setter Property="Padding" Value="5 6"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <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="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadComboBoxItem">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                Background="{TemplateBinding Background}">
                            <ContentPresenter x:Name="Content"
                                    Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:FluentResource 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:FluentResource ResourceKey=PressedBrush}"/>
                            </MultiDataTrigger.Setters>
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadComboBoxStyle" TargetType="controls:RadComboBox">
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
        <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:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="MinHeight" Value="28"/>
        <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.Triggers>
            <Trigger Property="IsEditable" Value="True">
                <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
                <Setter Property="Background" Value="Transparent"/>
            </Trigger>
        </Style.Triggers>
    </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">
            <Ellipse x:Name="Background" Fill="{TemplateBinding Background}" Stroke="{x:Null}" StrokeThickness="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
            <telerik:RadGlyph x:Name="Content" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16" Foreground="{TemplateBinding Foreground}" Glyph="{StaticResource GlyphClose}"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="Content" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadButtonCloseStyle" TargetType="telerik:RadButton">
        <Setter Property="Template" Value="{StaticResource RadButtonCloseControlTemplate}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="2 1"/>
        <Setter Property="BorderThickness" Value="0"/>
    </Style>
    <Style x:Key="RadAutoCompleteBoxItemStyle" TargetType="controls:RadAutoCompleteBoxItem">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="12"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
        <Setter Property="Margin" Value="1"/>
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Padding" Value="5 3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadAutoCompleteBoxItem">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.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"
                                        CommandParameter="{Binding}"
                                        Cursor="Arrow"
                                        IsTabStop="False"
                                        Focusable="False"
                                        Command="{x:Static telerik:RadAutoCompleteBoxCommands.RemoveItem}"
                                        Style="{StaticResource RadButtonCloseStyle}"/>
                            </Grid>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="contentPresenter" Property="Opacity" Value="{telerik1:FluentResource 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" TargetType="telerik:RadWatermarkTextBox" BasedOn="{StaticResource RadWatermarkTextBoxStyle}">
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{x:Null}"/>
        <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="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type controls:RadAutoCompleteBox}}}"/>
        <Setter Property="Focusable" Value="{Binding Focusable, RelativeSource={RelativeSource AncestorType={x:Type controls:RadAutoCompleteBox}}}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="DisabledBackground" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="Margin" Value="0 0 0 0"/>
        <Setter Property="Padding" Value="5 4"/>
    </Style>
    <ControlTemplate x:Key="RadAutoCompleteBoxTemplate" TargetType="controls:RadAutoCompleteBox">
        <Grid>
            <Border x:Name="BorderVisual"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <ScrollViewer x:Name="PART_ScrollViewer"
                    Height="{TemplateBinding Height}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    BorderThickness="0"
                    Padding="0"
                    Background="Transparent"
                    IsTabStop="False"
                    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/>
                        </ItemsPanelTemplate>
                    </controls:AutoCompleteBoxesItemsControl.ItemsPanel>
                </controls:AutoCompleteBoxesItemsControl>
            </ScrollViewer>
            <Border x:Name="FocusVisual"
                    BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    Background="{x:Null}"
                    Visibility="Collapsed"
                    IsHitTestVisible="False"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Popup x:Name="PART_Popup">
                <Grid x:Name="PopupRoot" Margin="5 0 5 5">
                    <mat:Shadow ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}" CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"/>
                    <telerik:RadListBox x:Name="PART_ListBox"
                            MinWidth="{TemplateBinding MinDropDownWidth}"
                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
                            mat:MaterialAssist.CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"
                            ItemsSource="{TemplateBinding FilteredItems}"
                            ItemTemplate="{TemplateBinding DropDownItemTemplate}"
                            ItemTemplateSelector="{TemplateBinding DropDownItemTemplateSelector}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}"
                            UseLayoutRounding="True"/>
                    <Border
                            Background="{Binding Background, ElementName=PART_ListBox}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusBottom}"
                            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="5"
                                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 Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
                <Setter TargetName="PART_ScrollViewer" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Focusable" Value="True"/>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"/>
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="Validation.HasError" Value="True">
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadAutoCompleteBoxStyle" TargetType="controls:RadAutoCompleteBox">
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="0"/>
        <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="Template" Value="{StaticResource RadAutoCompleteBoxTemplate}"/>
        <Setter Property="TextBoxStyle" Value="{StaticResource RadAutoCompleteTextBoxStyle}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0"/>
        <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}"/>
    <Style x:Key="IncreaseDecreaseRepeatButtonBaseStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="5"/>
        <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}}"/>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <DataTemplate x:Key="DecreaseRepeatButtonContentTemplate">
        <telerik:RadGlyph x:Name="Icon" Glyph="{StaticResource GlyphArrowChevronDown}"/>
    </DataTemplate>
    <DataTemplate x:Key="IncreaseRepeatButtonContentTemplate">
        <telerik:RadGlyph x:Name="Icon" Glyph="{StaticResource GlyphArrowChevronUp}"/>
    </DataTemplate>
    <Style x:Key="DecreaseRepeatButtonStyle" TargetType="RepeatButton" BasedOn="{StaticResource IncreaseDecreaseRepeatButtonBaseStyle}">
        <Setter Property="ContentTemplate" Value="{StaticResource DecreaseRepeatButtonContentTemplate}"/>
    </Style>
    <Style x:Key="IncreaseRepeatButtonStyle" TargetType="RepeatButton" BasedOn="{StaticResource IncreaseDecreaseRepeatButtonBaseStyle}">
        <Setter Property="ContentTemplate" Value="{StaticResource IncreaseRepeatButtonContentTemplate}"/>
    </Style>
    <ControlTemplate x:Key="RadNumericUpDownControlTemplate" TargetType="controls:RadNumericUpDown">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" x:Name="Column"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
            <TextBox x:Name="textbox"
                    AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                    AutomationProperties.HelpText="{TemplateBinding AutomationProperties.HelpText}"
                    AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}"
                    IsReadOnly="{TemplateBinding IsReadOnly}"
                    TabIndex="{TemplateBinding TabIndex}"
                    BorderThickness="0"
                    Padding="{TemplateBinding Padding}"
                    Background="Transparent"
                    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:FluentResource ResourceKey=MarkerMouseOverBrush}"
                    Opacity="{telerik1:FluentResource ResourceKey=InputOpacity}"
                    Focusable="{TemplateBinding Focusable}">
                <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.Column="2"
                    IsTabStop="{TemplateBinding AreButtonsTabStops}"
                    Style="{StaticResource IncreaseRepeatButtonStyle}"
                    mat:MaterialAssist.CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=TopBottomRight}"
                    BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"/>
            <RepeatButton x:Name="decrease"
                    Grid.Column="1"
                    IsTabStop="{TemplateBinding AreButtonsTabStops}"
                    Style="{StaticResource DecreaseRepeatButtonStyle}"
                    mat:MaterialAssist.CornerRadius="0"
                    BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"
                    BorderBrush="{TemplateBinding BorderBrush}"/>
            <Border x:Name="ReadOnlyVisual"
                    Grid.ColumnSpan="3"
                    Background="{telerik1:FluentResource ResourceKey=ReadOnlyBackgroundBrush}"
                    BorderBrush="{telerik1:FluentResource ResourceKey=ReadOnlyBorderBrush}"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                    IsHitTestVisible="False"
                    Visibility="Collapsed"/>
            <Border x:Name="FocusVisual"
                    Grid.ColumnSpan="3"
                    Background="{x:Null}"
                    BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                    IsHitTestVisible="False"
                    Visibility="Collapsed"/>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="ShowTextBox" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                <Setter TargetName="textbox" Property="Opacity" Value="1"/>
                <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsReadOnly" Value="True"/>
                    <Condition Property="ShowTextBox" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="Transparent"/>
                <Setter TargetName="textbox" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=ReadOnlyOpacity}"/>
                <Setter TargetName="ReadOnlyVisual" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsReadOnly" Value="True"/>
                    <Condition Property="ShowButtons" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="decrease" Property="BorderThickness" Value="{Binding ElementName=ReadOnlyVisual, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}"/>
                <Setter TargetName="increase" Property="BorderThickness" Value="{Binding ElementName=ReadOnlyVisual, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=Left}"/>
                <Setter TargetName="decrease" Property="BorderBrush" Value="{Binding ElementName=ReadOnlyVisual, Path=BorderBrush}"/>
                <Setter TargetName="increase" Property="BorderBrush" Value="{Binding ElementName=ReadOnlyVisual, Path=BorderBrush}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="ShowTextBox" Value="True"/>
                    <Condition Property="ShowButtons" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="BorderVisual" Property="CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=LeftTopBottom}"/>
                <Setter TargetName="BorderVisual" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"/>
            </MultiTrigger>
            <Trigger Property="ShowTextBox" Value="False">
                <Setter TargetName="textbox" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="decrease" Property="mat:MaterialAssist.CornerRadius" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CornerRadius), Converter={StaticResource CornerRadiusConverter}, ConverterParameter=LeftTopBottom}"/>
                <Setter TargetName="BorderVisual" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="Column" Property="Width" Value="0"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="ShowTextBox" Value="False"/>
                    <Condition Property="IsReadOnly" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="BorderVisual" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="decrease" Property="BorderThickness" Value="{Binding ElementName=ReadOnlyVisual, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopBottom}"/>
                <Setter TargetName="increase" Property="BorderThickness" Value="{Binding ElementName=ReadOnlyVisual, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopRightBottom}"/>
                <Setter TargetName="decrease" Property="BorderBrush" Value="{Binding ElementName=ReadOnlyVisual, Path=BorderBrush}"/>
                <Setter TargetName="increase" Property="BorderBrush" Value="{Binding ElementName=ReadOnlyVisual, Path=BorderBrush}"/>
            </MultiTrigger>
            <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 Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                <Setter TargetName="textbox" Property="Opacity" Value="1"/>
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="textbox" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadNumericUpDownStyle" TargetType="controls:RadNumericUpDown">
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5 6"/>
        <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="mat:MaterialAssist.CornerRadius" Value="0"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinWidth" Value="38"/>
        <Setter Property="MinHeight" Value="38"/>
        <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" Margin="{StaticResource CalendarButtonMargin}">
                        <Border x:Name="BorderVisual"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <mat:FluentControl x:Name="Fluent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}" IsSmartClipped="True">
                            <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}"/>
                        </mat:FluentControl>
                        <Border x:Name="FocusVisual"
                                Background="{x:Null}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <Border x:Name="SelectedVisual"
                                Background="{x:Null}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                BorderBrush="{telerik1:FluentResource ResourceKey=IconBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFromCurrentView" Value="False">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True">
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="ButtonType" Value="TodayDate">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
                            <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" SourceName="Fluent" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True"/>
                                <Condition Property="ButtonType" Value="TodayDate"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
                        </MultiTrigger>
                        <Trigger Property="ButtonType" Value="WeekNumber">
                            <Setter TargetName="Fluent" Property="IsEnabled" Value="False"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background, Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background, Mode=OneWay}"/>
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=AccentBrush}"/>
                        </Trigger>
                        <Trigger Property="ButtonType" Value="WeekName">
                            <Setter TargetName="Fluent" Property="IsEnabled" Value="False"/>
                            <Setter TargetName="Content" Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                            <Setter TargetName="Content" Property="FontWeight" Value="SemiBold"/>
                            <Setter TargetName="LayoutRoot" Property="Margin" Value="0"/>
                            <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:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource 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}"/>
                        <Border x:Name="Header"
                                Visibility="{TemplateBinding HeaderVisibility}"
                                Margin="{StaticResource CalendarViewHeaderMargin}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                MinHeight="40">
                            <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="306" Height="268"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MonthViewStyle" TargetType="calendar:CalendarView">
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource 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}"/>
                        <Border x:Name="Header"
                                Visibility="{TemplateBinding HeaderVisibility}"
                                Margin="{StaticResource CalendarViewHeaderMargin}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                MinHeight="40">
                            <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"
                                    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="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"
                                    Margin="{TemplateBinding BorderThickness}"
                                    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="306" Height="268"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="calendar:CalendarView" BasedOn="{StaticResource MonthViewStyle}"/>
    <Style x:Key="MoveRepeatButtonBaseStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">
        <Setter Property="Width" Value="38"/>
        <Setter Property="Height" Value="38"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="#01FFFFFF"/>
    </Style>
    <Style x:Key="MoveLeftButtonStyle" TargetType="RepeatButton" BasedOn="{StaticResource MoveRepeatButtonBaseStyle}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <telerik:RadGlyph x:Name="Icon" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronUp}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="MoveRightButtonStyle" TargetType="RepeatButton" BasedOn="{StaticResource MoveRepeatButtonBaseStyle}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <telerik:RadGlyph x:Name="Icon" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Center" Glyph="{StaticResource GlyphArrowChevronDown}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CalendarHeaderButton" TargetType="Button">
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSizeL}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Padding" Value="10 0"/>
        <Setter Property="MinHeight" Value="30"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid x:Name="LayoutRoot" Background="#01FFFFFF">
                        <TextBlock x:Name="Text"
                                Margin="{TemplateBinding Padding}"
                                Text="{TemplateBinding Content}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                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:FluentResource 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:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="Padding" Value="0"/>
        <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}"/>
                        <calendar:TransitionPanel x:Name="TransitionPanel" Grid.Row="1" ClipToBounds="True" Margin="{StaticResource CalendarTransitionPanelMargin}" FocusVisualStyle="{x:Null}">
                            <primitives:RadUniformGrid x:Name="MonthViews" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}"/>
                            <primitives:RadUniformGrid x:Name="YearViews" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed"/>
                            <primitives:RadUniformGrid x:Name="DecadeViews" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed"/>
                            <primitives:RadUniformGrid x:Name="CenturyViews" Rows="{TemplateBinding Rows}" Columns="{TemplateBinding Columns}" Visibility="Collapsed"/>
                        </calendar:TransitionPanel>
                        <Border x:Name="Navigation"
                                Canvas.ZIndex="2"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopRight}"
                                Visibility="{TemplateBinding HeaderVisibility}"
                                Background="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"
                                MinHeight="40">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Button x:Name="Header" Grid.Column="0" Style="{StaticResource CalendarHeaderButton}"/>
                                <RepeatButton x:Name="MoveLeft"
                                        AutomationProperties.Name="Move Left"
                                        Grid.Column="1"
                                        Visibility="{TemplateBinding PreviousButtonVisibility}"
                                        Style="{StaticResource MoveLeftButtonStyle}"/>
                                <RepeatButton x:Name="MoveRight"
                                        AutomationProperties.Name="Move Right"
                                        Grid.Column="2"
                                        Visibility="{TemplateBinding NextButtonVisibility}"
                                        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="mat:MaterialAssist.CornerRadius" Value="0"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.PressedBrush" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
        <Setter Property="mat:MaterialAssist.CheckedBrush" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <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="36"/>
        <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="{TemplateBinding mat:MaterialAssist.CornerRadius}"/>
                        <mat:FluentControl x:Name="Fluent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}" IsSmartClipped="True">
                            <ContentControl x:Name="Content"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Margin="{TemplateBinding Padding}"
                                    Foreground="{TemplateBinding Foreground}"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </mat:FluentControl>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" SourceName="Fluent" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.CheckedBrush), Mode=OneWay}"/>
                        </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:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSizeL}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="Padding" Value="{StaticResource CalendarHeaderPadding}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <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"
                                CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"
                                Background="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"/>
                        <Border x:Name="Header"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=LeftTopRight}"
                                BorderBrush="{x:Null}"
                                CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusTop}"
                                MinHeight="40">
                            <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 Background="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}" BorderBrush="{telerik1:FluentResource ResourceKey=BasicBrush}" BorderThickness="1">
            <ContentControl Margin="5" Content="{Binding}" Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        </Border>
    </DataTemplate>
    <Style TargetType="controls:RadDateTimePicker" x:Key="RadDateTimePickerStyle">
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <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:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5 5 2 5"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <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}"/>
                        <telerik:RadWatermarkTextBox x:Name="PART_DateTimeInput"
                                AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                                AutomationProperties.HelpText="{TemplateBinding AutomationProperties.HelpText}"
                                AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}"
                                mat:MaterialAssist.FocusBrush="{x:Null}"
                                BorderBrush="{x:Null}"
                                Background="{x:Null}"
                                DisabledBackground="{x:Null}"
                                BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=BottomLeftTop}"
                                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}"
                                WatermarkContent="{TemplateBinding DateTimeWatermarkContent}"
                                WatermarkTemplate="{TemplateBinding DateTimeWatermarkTemplate}"
                                TextAlignment="{TemplateBinding TextAlignment}"
                                TabIndex="0"
                                SelectionOnFocus="{TemplateBinding SelectionOnFocus}"
                                Padding="{TemplateBinding Padding}"
                                FontFamily="{telerik1:FluentResource ResourceKey=FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                Focusable="{TemplateBinding Focusable}"/>
                        <telerik:RadDropDownButton x:Name="PART_DropDownButton"
                                Grid.Column="1"
                                TabIndex="1"
                                Padding="0"
                                DropDownIndicatorVisibility="Collapsed"
                                BorderThickness="0"
                                BorderBrush="{x:Null}"
                                Background="{x:Null}"
                                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"
                                Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                                Width="26"
                                controls:DateTimePickerExtensions.FocusContentOnOpen="True"
                                Focusable="False">
                            <telerik:RadDropDownButton.DropDownContent>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Border x:Name="BackgroundVisual" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
                                    <controls:RadCalendar x:Name="PART_Calendar"
                                            Grid.Column="0"
                                            Grid.Row="0"
                                            Background="{x:Null}"
                                            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}"/>
                                    <controls:DateTimePickerClock x:Name="PART_Clock"
                                            Grid.Column="1"
                                            Grid.Row="0"
                                            ItemsSource="{TemplateBinding ClockItemsSource}"
                                            StartTime="{TemplateBinding StartTime}"
                                            EndTime="{TemplateBinding EndTime}"
                                            TimeInterval="{Binding TimeInterval, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                            IsReadOnly="{TemplateBinding IsReadOnly}"
                                            Style="{TemplateBinding ClockStyle}"
                                            Culture="{TemplateBinding Culture}"
                                            SelectedItem="{Binding SelectedTime, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                    <Border x:Name="CloseButtonContainer"
                                            Grid.Column="0"
                                            Grid.ColumnSpan="2"
                                            Grid.Row="1"
                                            telerik:TouchManager.TouchMode="None"
                                            Background="{telerik1:FluentResource ResourceKey=MainBrush}"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="2 0 2 2">
                                        <telerik:RadButton x:Name="PART_Close"
                                                TabIndex="2"
                                                IsTabStop="True"
                                                HorizontalAlignment="Right"
                                                telerik:LocalizationManager.ResourceKey="Close"
                                                Command="{x:Static controls:RadDateTimePickerCommands.Close}"
                                                KeyboardNavigation.TabNavigation="Once"
                                                Margin="5 4"
                                                Padding="25 5"/>
                                    </Border>
                                    <Border x:Name="TodayButtonBorder"
                                            Grid.Row="1"
                                            Background="{telerik1:FluentResource ResourceKey=MainBrush}"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="2 0 2 2"
                                            SnapsToDevicePixels="True"
                                            Visibility="{TemplateBinding TodayButtonVisibility}">
                                        <telerik:RadButton x:Name="TodayButton"
                                                CornerRadius="0"
                                                IsBackgroundVisible="False"
                                                Command="{x:Static telerik:RadDateTimePickerCommands.SetToday}"
                                                BorderThickness="0"
                                                Margin="0"
                                                Padding="0"
                                                Content="{TemplateBinding TodayButtonContent}"/>
                                    </Border>
                                </Grid>
                            </telerik:RadDropDownButton.DropDownContent>
                            <telerik:RadDropDownButton.Template>
                                <ControlTemplate TargetType="telerik:RadDropDownButton">
                                    <Grid>
                                        <Border x:Name="Background">
                                            <mat:FluentControl EffectMode="Glow" BorderThickness="0" IsSmartClipped="True">
                                                <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                            </mat:FluentControl>
                                        </Border>
                                        <Popup x:Name="DropDownPopup"
                                                HorizontalOffset="0"
                                                VerticalOffset="1"
                                                AllowsTransparency="True"
                                                mat:ThemeEffectsHelper.IsAcrylic="True"
                                                StaysOpen="False"
                                                Focusable="false"
                                                Placement="Bottom"
                                                IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                                            <Grid x:Name="DropDownPopupGrid" Background="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}">
                                                <ContentPresenter x:Name="DropDownPopupContent"
                                                        Content="{TemplateBinding DropDownContent}"
                                                        ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                                            </Grid>
                                        </Popup>
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                        <Trigger SourceName="DropDownPopup" Property="mat:ThemeEffectsHelper.IsAcrylic" Value="True">
                                            <Setter TargetName="DropDownPopupGrid" Property="Background" Value="{Binding Source={StaticResource PrimaryBackgroundBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=153}"/>
                                        </Trigger>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter Property="Background" TargetName="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
                                        </Trigger>
                                        <Trigger Property="IsPressed" Value="True">
                                            <Setter Property="Background" TargetName="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                                        </Trigger>
                                        <Trigger Property="IsOpen" Value="True">
                                            <Setter Property="Background" TargetName="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </telerik:RadDropDownButton.Template>
                            <Grid>
                                <Grid x:Name="DropDownIcon" Background="Transparent" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                    <telerik:RadGlyph x:Name="DateTimePickerIcon"
                                            Visibility="Collapsed"
                                            FontSize="16"
                                            Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Glyph="{StaticResource GlyphGrid}"
                                            FlowDirection="LeftToRight"/>
                                    <telerik:RadGlyph x:Name="CalendarIcon"
                                            Visibility="Collapsed"
                                            FontSize="16"
                                            Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Glyph="{StaticResource GlyphCalendar}"
                                            FlowDirection="LeftToRight"/>
                                    <telerik:RadGlyph x:Name="ClockIcon"
                                            Visibility="Collapsed"
                                            FontSize="16"
                                            Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Center"
                                            Glyph="{StaticResource GlyphClock}"
                                            FlowDirection="LeftToRight"/>
                                </Grid>
                            </Grid>
                        </telerik:RadDropDownButton>
                        <Border x:Name="FocusVisual"
                                Background="{x:Null}"
                                IsHitTestVisible="False"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                Visibility="Collapsed"
                                Grid.ColumnSpan="2"/>
                        <Border x:Name="ReadOnlyVisual"
                                Grid.ColumnSpan="2"
                                IsHitTestVisible="False"
                                Background="{telerik1:FluentResource ResourceKey=ReadOnlyBackgroundBrush}"
                                BorderBrush="{telerik1:FluentResource ResourceKey=ReadOnlyBorderBrush}"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                Visibility="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                        <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>
                        <Trigger Property="IsMouseOver" Value="True" SourceName="PART_DateTimeInput">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsDropDownOpen" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="DropDownIcon" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>

                        <!-- Focused -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                                <Condition Property="IsOpen" SourceName="PART_DropDownButton" Value="False"/>
                                <Condition Property="IsMouseOver" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                        </MultiTrigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True" SourceName="PART_DateTimeInput">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsDropDownOpen" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                        </Trigger>
                        <Trigger Property="InputMode" Value="DateTimePicker">
                            <Setter TargetName="DateTimePickerIcon" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="InputMode" Value="DateTimePicker"/>
                                <Condition Property="TodayButtonVisibility" Value="Visible"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="CloseButtonContainer" Property="Grid.ColumnSpan" Value="1"/>
                            <Setter TargetName="CloseButtonContainer" Property="Grid.Column" Value="1"/>
                        </MultiTrigger>
                        <Trigger Property="InputMode" Value="DatePicker">
                            <Setter TargetName="PART_Clock" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="CalendarIcon" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="CloseButtonContainer" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="InputMode" Value="DatePicker"/>
                                <Condition Property="TodayButtonVisibility" Value="Visible"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="TodayButtonBorder" Property="MinHeight" Value="36"/>
                        </MultiTrigger>
                        <Trigger Property="InputMode" Value="TimePicker">
                            <Setter TargetName="PART_Calendar" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="ClockIcon" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="PART_Clock" Property="Margin" Value="0"/>
                            <Setter TargetName="CloseButtonContainer" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="InputMode" Value="TimePicker"/>
                                <Condition Property="TodayButtonVisibility" Value="Visible"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="TodayButtonBorder" Property="Grid.Column" Value="2"/>
                            <Setter TargetName="TodayButtonBorder" Property="MinHeight" Value="36"/>
                        </MultiTrigger>
                        <Trigger Property="Validation.HasError" Value="True">
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </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="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadiusLeft}"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="0 0 28 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"
                            mat:MaterialAssist.CheckedBrush="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                            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"
                    CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <Border x:Name="FocusVisual"
                    CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"
                    Background="{x:Null}"
                    IsHitTestVisible="False"
                    Visibility="Collapsed"
                    BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    Grid.ColumnSpan="2"/>
            <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="1"
                    CloseOnEnter="True"
                    DropDownIndicatorVisibility="Collapsed"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    IsTabStop="False"
                    IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                    Padding="0"
                    Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=TopRightBottom}"
                    PopupPlacementTarget="{Binding ElementName=PART_CalculatorInput}"
                    TabIndex="1"
                    Focusable="False"
                    IsBackgroundVisible="False">
                <telerik:RadDropDownButton.DropDownContent>
                    <controls:RadCalculator x:Name="PART_Calculator"
                            Background="Transparent"
                            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 x:Name="root">
                            <mat:FluentControl EffectMode="Glow" CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadiusRight}" BorderThickness="0" IsSmartClipped="True">
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </mat:FluentControl>
                            <Popup x:Name="DropDownPopup"
                                    VerticalOffset="1"
                                    mat:ThemeEffectsHelper.IsAcrylic="True"
                                    AllowsTransparency="True"
                                    StaysOpen="False"
                                    Focusable="false"
                                    Placement="Bottom"
                                    IsOpen="{Binding Path=IsOpen, RelativeSource={RelativeSource TemplatedParent}}">
                                <Border x:Name="DropDownPopupBorder" Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}">
                                    <ContentPresenter x:Name="DropDownPopupContent"
                                            Content="{TemplateBinding DropDownContent}"
                                            ContentTemplate="{TemplateBinding DropDownContentTemplate}"
                                            DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}"/>
                                </Border>
                            </Popup>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger SourceName="DropDownPopup" Property="mat:ThemeEffectsHelper.IsAcrylic" Value="True">
                                <Setter TargetName="DropDownPopupBorder" Property="Background" Value="{Binding Source={StaticResource AlternativeBrushProxy}, Path=ProxyValue, Converter={StaticResource OpacityConverter}, ConverterParameter=153}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="root" Property="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="root" Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                            </Trigger>
                            <Trigger Property="IsOpen" Value="True">
                                <Setter TargetName="root" Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </telerik:RadDropDownButton.Template>
                <telerik:RadGlyph x:Name="DropDownIcon"
                        FontSize="16"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Right"
                        SnapsToDevicePixels="True"
                        Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                        Margin="5 0 4 0"
                        Glyph="{StaticResource GlyphCalculator}"/>
            </telerik:RadDropDownButton>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True"/>
            <Trigger Property="IsDropDownOpen" Value="True"/>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsFocused" Value="True"/>
                    <Condition Property="IsDropDownOpen" Value="False"/>
                    <Condition Property="IsMouseOver" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="PART_CalculatorInput" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                <Setter TargetName="DropDownIcon" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadCalculatorPickerStyle" TargetType="controls:RadCalculatorPicker">
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="Template" Value="{StaticResource RadCalculatorPickerTemplate}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5 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"/>
    <Style TargetType="telerik1:RadButton" x:Key="RadColorPicker_HeaderButtonStyle" BasedOn="{StaticResource RadButtonStyle}">
        <Setter Property="Padding" Value="10 5"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=AlternativeBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik1:RadButton">
                    <Border x:Name="BorderVisual"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{TemplateBinding CornerRadius}">
                        <mat:FluentControl
                                CornerRadius="{TemplateBinding CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch">
                            <Grid Margin="{TemplateBinding Padding}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>

                                <!-- this x:Name is called from code -->
                                <Border x:Name="rectangleborder"
                                        Background="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                        BorderThickness="1"
                                        BorderBrush="{telerik1:FluentResource ResourceKey=BasicBrush}"
                                        Margin="0 0 10 0"
                                        Width="18"
                                        Height="18"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <ContentControl
                                        Grid.Column="1"
                                        x:Name="contentPresenter"
                                        Content="{TemplateBinding Content}"
                                        ContentTemplate="{TemplateBinding ContentTemplate}"
                                        Foreground="{TemplateBinding Foreground}"
                                        FontSize="{TemplateBinding FontSize}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </mat:FluentControl>
                    </Border>
                    <ControlTemplate.Triggers>

                        <!-- IsMouseOver -->
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                        </Trigger>

                        <!-- IsPressed -->
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.PressedBrush), Mode=OneWay}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <colorPaletteConverters:PositionStateToBorderThicknessConverter x:Key="PositionConverter"/>
    <Style x:Key="RadColorPaletteViewItemStyle" TargetType="controls:RadColorPaletteViewItem">
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MinWidth" Value="20"/>
        <Setter Property="MinHeight" Value="20"/>
        <Setter Property="Margin" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorPaletteViewItem">
                    <Grid x:Name="RootElement" SnapsToDevicePixels="True">
                        <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="1">
                            <ContentPresenter x:Name="Content" ToolTipService.ToolTip="{Binding}"/>
                        </Border>
                        <Border x:Name="MouseOverVisual"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.MouseOverBrush}"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                Visibility="Collapsed"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="MouseOverVisual" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="MouseOverVisual" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="MouseOverVisual" Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AccentPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="MouseOverVisual" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="MouseOverVisual" Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" TargetName="Content" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadColorPaletteViewStyle" TargetType="controls:RadColorPaletteView">
        <Setter Property="Padding" Value="8"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorPaletteView">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ItemsPresenter x:Name="ItemsPresenter" Margin="{TemplateBinding Padding}"/>
                    </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:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="MainPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManagerProvider}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorMainPaletteHeaderText}"/>
        <Setter Property="NoColorText" Value="{Binding Manager.Culture, Source={StaticResource localizationManagerProvider}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorAutomaticColorText}"/>
        <Setter Property="RecentColorsHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManagerProvider}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorRecentColorsHeaderText}"/>
        <Setter Property="StandardPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManagerProvider}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorStandardPaletteHeaderText}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorSelector">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="RootElement">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <telerik1:RadButton
                                    Content="{TemplateBinding NoColorText}"
                                    x:Name="PaletteHeader"
                                    Grid.Row="0"
                                    Tag="{Binding AutomaticColor, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource converter}}"
                                    Style="{StaticResource RadColorPicker_HeaderButtonStyle}"/>
                            <Border Grid.Row="1" Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}" MinHeight="28">
                                <TextBlock x:Name="mainPaletteHeader"
                                        FontStyle="{TemplateBinding FontStyle}"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        Foreground="{TemplateBinding Foreground}"
                                        FontSize="{TemplateBinding FontSize}"
                                        Text="{TemplateBinding MainPaletteHeaderText}"
                                        VerticalAlignment="Center"
                                        Margin="10 0"/>
                            </Border>
                            <controls:RadColorPaletteView x:Name="HeaderPalette" Grid.Row="2" Padding="8 8 8 3" ItemTemplate="{TemplateBinding PaletteItemsTemplate}" ColorPropertyPath="{TemplateBinding ColorPropertyPath}">
                                <controls:RadColorPaletteView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <primitives:RadUniformGrid Background="Transparent" Columns="10"/>
                                    </ItemsPanelTemplate>
                                </controls:RadColorPaletteView.ItemsPanel>
                            </controls:RadColorPaletteView>
                            <controls:RadColorPaletteView x:Name="MainPalette"
                                    Grid.Row="3"
                                    ItemTemplate="{TemplateBinding PaletteItemsTemplate}"
                                    ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                    ItemContainerStyle="{TemplateBinding MainPaletteItemsStyle}"
                                    PaletteColumnsCount="{TemplateBinding MainPaletteColumnsCount}"/>
                            <Border x:Name="StandardPaletteBorder" Grid.Row="4" Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}" MinHeight="28">
                                <TextBlock x:Name="standardPaletteHeader"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        Foreground="{TemplateBinding Foreground}"
                                        FontSize="{TemplateBinding FontSize}"
                                        VerticalAlignment="Center"
                                        Text="{TemplateBinding StandardPaletteHeaderText}"
                                        Margin="10 0"/>
                            </Border>
                            <controls:RadColorPaletteView x:Name="StandartPalette" Grid.Row="5" ItemTemplate="{TemplateBinding PaletteItemsTemplate}" ColorPropertyPath="{TemplateBinding ColorPropertyPath}">
                                <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:FluentResource ResourceKey=AlternativeBrush}" MinHeight="28">
                                <TextBlock x:Name="RecentColorsPaletteHeader"
                                        FontWeight="{TemplateBinding FontWeight}"
                                        Foreground="{TemplateBinding Foreground}"
                                        FontSize="{TemplateBinding FontSize}"
                                        VerticalAlignment="Center"
                                        Text="{TemplateBinding RecentColorsHeaderText}"
                                        Margin="10 0"/>
                            </Border>
                            <controls:RadColorPaletteView
                                    Grid.Row="7"
                                    x:Name="RecentColorsPalette"
                                    ItemTemplate="{TemplateBinding PaletteItemsTemplate}"
                                    ColorPropertyPath="{TemplateBinding ColorPropertyPath}"
                                    BorderThickness="0"
                                    Background="{TemplateBinding Background}"
                                    Visibility="Collapsed">
                                <controls:RadColorPaletteView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <primitives:RadUniformGrid Background="Transparent" Columns="10" Rows="1"/>
                                    </ItemsPanelTemplate>
                                </controls:RadColorPaletteView.ItemsPanel>
                            </controls:RadColorPaletteView>
                            <Border x:Name="AdditionalContentBorder" Visibility="Collapsed" Grid.Row="8">
                                <ContentPresenter Content="{TemplateBinding AdditionalContent}" ContentTemplate="{TemplateBinding AdditionalContentTemplate}"/>
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </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 localizationManagerProvider}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorMainPaletteHeaderText}"/>
        <Setter Property="NoColorText" Value="{Binding Manager.Culture, Source={StaticResource localizationManagerProvider}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorAutomaticColorText}"/>
        <Setter Property="RecentColorsHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManagerProvider}, Converter={StaticResource cultureConverter}, ConverterParameter=ColorSelectorRecentColorsHeaderText}"/>
        <Setter Property="StandardPaletteHeaderText" Value="{Binding Manager.Culture, Source={StaticResource localizationManagerProvider}, 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="Padding" Value="5 4 5 5"/>
        <Setter Property="ColorSelectorStyle" Value="{StaticResource RadColorSelectorStyle}"/>
        <Setter Property="SplitButtonStyle" Value="{StaticResource RadSplitButtonStyle}"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="AutomaticColor" Value="Black"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                        <telerik1:RadGlyph FontSize="16" Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik1:RadButton}, Mode=FindAncestor}, Path=Foreground, Mode=OneWay}" Glyph="{StaticResource GlyphForegroundColor}"/>
                        <Rectangle Width="18" Height="3" Fill="{Binding Converter={StaticResource converter}}"/>
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorPicker">
                    <Grid x:Name="Root"
                            Width="{TemplateBinding Width}"
                            Height="{TemplateBinding Height}"
                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <telerik1:RadSplitButton x:Name="SplitButton"
                                Style="{TemplateBinding SplitButtonStyle}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                DropDownPlacement="{Binding Path=DropDownPlacement, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                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}"
                                        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}"/>
                            </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="mat:MaterialAssist.ShadowDepth" Value="Depth2"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="10"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadColorEditor">
                    <Grid>
                        <mat:Shadow Background="{TemplateBinding Background}" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}" CornerRadius="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
                        <Border x:Name="LayoutRoot"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                CornerRadius="{telerik1:FluentResource 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 10 15">
                                    <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 10 15">
                                    <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 10 0" Height="{StaticResource PadWidthHeight}">
                                    <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="{StaticResource PadWidthHeight}">
                                        <ToolTipService.ToolTip>
                                            <TextBlock Text="{telerik:LocalizableResource Key=ColorEditorPreviousColor}"/>
                                        </ToolTipService.ToolTip>
                                    </Border>
                                </Grid>
                                <Grid Grid.Column="1" x:Name="HuePadGrid" Margin="0 0 0 15" Width="{StaticResource PadWidthHeight}">
                                    <Rectangle Fill="{StaticResource HueBrush}"/>
                                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                        <pad:Pad x:Name="HuePad" MovementDirection="Y">
                                            <Border
                                                    BorderThickness="0 4"
                                                    BorderBrush="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"
                                                    Background="Transparent"
                                                    Width="{StaticResource PadWidthHeight}"
                                                    Height="{StaticResource GlyphArrowSize}"
                                                    FlowDirection="LeftToRight"
                                                    SnapsToDevicePixels="True"/>
                                        </pad:Pad>
                                    </Border>
                                </Grid>
                                <Grid Grid.Column="1" x:Name="LuminancePadGrid" Margin="0 0 0 5" Width="{StaticResource PadWidthHeight}">
                                    <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">
                                            <Border
                                                    BorderThickness="0 4"
                                                    BorderBrush="{telerik1:FluentResource ResourceKey=MarkerInvertedBrush}"
                                                    Background="Transparent"
                                                    Width="{StaticResource PadWidthHeight}"
                                                    Height="{StaticResource GlyphArrowSize}"
                                                    FlowDirection="LeftToRight"
                                                    SnapsToDevicePixels="True"/>
                                        </pad:Pad>
                                    </Border>
                                </Grid>
                                <Grid Grid.Column="2" x:Name="ColorModesGrid" Margin="{StaticResource ColorModesGridMargin}" 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:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="G"
                                                Grid.Row="1"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="B"
                                                Grid.Row="2"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource 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:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="L"
                                                Grid.Row="1"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="S"
                                                Grid.Row="2"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource 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:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="S"
                                                Grid.Row="1"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="V"
                                                Grid.Row="2"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource 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:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="M"
                                                Grid.Row="1"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="Y"
                                                Grid.Row="2"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                                        <TextBlock
                                                Text="K"
                                                Grid.Row="3"
                                                Grid.Column="0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource 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:FluentResource 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 MinWidth="{StaticResource ColorEditor_Input_MinWidth}" MaxWidth="90" Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock
                                                Text="#"
                                                Grid.Column="0"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Center"
                                                FontSize="{TemplateBinding FontSize}"
                                                Foreground="{telerik1:FluentResource 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>
                    </Grid>
                    <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:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="SelectionBrush" Value="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}"/>
        <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
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CornerRadius="{TemplateBinding CornerRadius}">
            <telerik1:RadGlyph x:Name="Path"
                    FontSize="16"
                    Glyph="{StaticResource GlyphClose}"
                    Foreground="{TemplateBinding Foreground}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    Margin="{TemplateBinding Padding}"/>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=ValidationBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=ValidationBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="MaskedInputClearButtonStyle" TargetType="telerik1:RadButton">
        <Setter Property="Template" Value="{StaticResource MaskedInputClearButtonTemplate}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="5 6"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
    </Style>
    <Style TargetType="controls:RadMaskedInputBase" x:Key="RadMaskedInputBaseStyle">
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="mat:MaterialAssist.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5 6"/>
        <Setter Property="MinHeight" Value="28"/>
        <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="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadMaskedInputBase">
                    <Grid>
                        <Border x:Name="BorderVisual"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        <Border x:Name="ReadOnlyVisual"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                BorderBrush="{telerik1:FluentResource ResourceKey=ReadOnlyBorderBrush}"
                                Background="{telerik1:FluentResource ResourceKey=ReadOnlyBackgroundBrush}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                IsHitTestVisible="False"
                                Visibility="Collapsed"/>
                        <Border x:Name="FocusVisual"
                                Background="{x:Null}"
                                BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                                BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                                CornerRadius="{TemplateBinding mat:MaterialAssist.CornerRadius}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                IsHitTestVisible="False"
                                Visibility="Collapsed"/>
                        <Grid x:Name="GridContainer">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <telerikMaskedInput:PreviewInputTextBox x:Name="EditorSite"
                                    TabIndex="{TemplateBinding TabIndex}"
                                    AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                                    AutomationProperties.HelpText="{TemplateBinding AutomationProperties.HelpText}"
                                    AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}"
                                    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:FluentResource ResourceKey=MarkerMouseOverBrush}"
                                    Focusable="{TemplateBinding Focusable}"
                                    Opacity="0"/>
                            <Border x:Name="DisplayTextContent" IsHitTestVisible="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
                                <telerikMaskedInput:PreviewInputTextBox x:Name="DisplayText"
                                        AutomationProperties.Name="DisplayTextTextBox"
                                        AutomationProperties.HelpText="{TemplateBinding AutomationProperties.HelpText}"
                                        AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}"
                                        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}"
                                        Opacity="{telerik1:FluentResource ResourceKey=InputOpacity}"/>
                            </Border>
                            <Border x:Name="EmptyContent" IsHitTestVisible="False" Visibility="Collapsed">
                                <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}"
                                        Opacity="{telerik1:FluentResource ResourceKey=InputOpacity}"/>
                            </Border>
                            <telerik1:RadButton x:Name="ClearButton"
                                    Command="{TemplateBinding ClearCommand}"
                                    Style="{TemplateBinding ClearButtonStyle}"
                                    Opacity="0"
                                    Grid.Column="1"
                                    Visibility="{Binding Path=IsClearButtonVisible, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsReadOnly" Value="True">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=ReadOnlyOpacity}"/>
                            <Setter TargetName="DisplayText" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=ReadOnlyOpacity}"/>
                            <Setter TargetName="ReadOnlyVisual" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="DisplayTextContent" Property="Visibility" Value="Collapsed"/>
                            <Setter TargetName="EditorSite" Property="Opacity" Value="1"/>
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mat:MaterialAssist.MouseOverBrush), Mode=OneWay}"/>
                            <Setter TargetName="Content" Property="Opacity" Value="1"/>
                            <Setter TargetName="DisplayText" Property="Opacity" Value="1"/>
                            <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 TargetName="EmptyContent" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="DisplayTextContent" Property="Visibility" Value="Collapsed"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Content" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="DisplayText" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
                        </Trigger>

                        <!-- Invalid -->
                        <Trigger Property="Validation.HasError" Value="True">
                            <Setter TargetName="FocusVisual" Property="Visibility" Value="Collapsed"/>
                        </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}"/>
    <Style x:Key="RadRatingStyle" TargetType="controls:RadRating">
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <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:FluentResource ResourceKey=AccentFocusedBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RadRatingItemStyle" TargetType="controls:RadRatingItem">
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:RadRatingItem">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="ReadOnlyRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalRatingItem" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Hidden</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </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">
                            <telerik1:RadGlyph x:Name="NormalRatingItem" Foreground="{telerik1:FluentResource ResourceKey=IconBrush}" FontSize="32" Glyph="{StaticResource GlyphStarOutline}"/>
                            <telerik1:RadGlyph x:Name="ReadOnlyRatingItem" Foreground="{telerik1:FluentResource ResourceKey=ComplementaryBrush}" FontSize="32" Glyph="{StaticResource GlyphStar}" Opacity="0"/>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding ValueRatio}" ExpandDirection="Right" HorizontalContentAlignment="Center">
                                <telerik1:RadGlyph x:Name="SelectedUnHoveredRatingItem"
                                        Foreground="{telerik1:FluentResource ResourceKey=AccentBrush}"
                                        FontSize="32"
                                        Glyph="{StaticResource GlyphStarOutline}"
                                        Opacity="0"/>
                            </telerikRating:LinearClipper>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding RatioVisible}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                                <telerik1:RadGlyph x:Name="MouseOverRatingItem" Foreground="{telerik1:FluentResource ResourceKey=AccentMouseOverBrush}" FontSize="32" Glyph="{StaticResource GlyphStar}"/>
                            </telerikRating:LinearClipper>
                            <telerikRating:LinearClipper RatioVisible="{TemplateBinding RatioVisible}" HorizontalContentAlignment="Center" ExpandDirection="Right">
                                <telerik1:RadGlyph x:Name="SelectedRatingItem" Foreground="{telerik1:FluentResource ResourceKey=AccentBrush}" FontSize="32" Glyph="{StaticResource GlyphStar}"/>
                            </telerikRating:LinearClipper>
                            <telerik1:RadGlyph x:Name="DisabledRatingItemBorder"
                                    Foreground="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"
                                    FontSize="32"
                                    Glyph="{StaticResource GlyphStarOutline}"
                                    Opacity="0"/>
                            <telerikRating:LinearClipper x:Name="DisabledRatingItem" HorizontalContentAlignment="Center" RatioVisible="{TemplateBinding RatioVisible}" ExpandDirection="Right" Opacity="0">
                                <telerik1:RadGlyph Foreground="{telerik1:FluentResource ResourceKey=BasicSolidBrush}" FontSize="32" Glyph="{StaticResource GlyphStar}"/>
                            </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="DisabledRatingItemBorder" Value="1"/>
                            <Setter Property="Opacity" TargetName="NormalRatingItem" Value="0"/>
                            <Setter Property="Visibility" TargetName="ReadOnlyRatingItem" Value="Collapsed"/>
                            <Setter Property="Visibility" TargetName="SelectedRatingItem" Value="Collapsed"/>
                        </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="AllowDrop" Value="False"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="DisabledBackground" Value="{x:Null}"/>
        <Setter Property="Opacity" Value="{telerik1:FluentResource ResourceKey=InputOpacity}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}"/>
        <Setter Property="CaretBrush" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadWatermarkTextBox">
                    <Grid x:Name="RootElement">
                        <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{x:Null}"/>
                        <ScrollViewer x:Name="PART_ContentHost"
                                Background="{x:Null}"
                                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:FluentResource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="WatermarkVisualElement" Property="Opacity" Value="{telerik1:FluentResource 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
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Foreground="{TemplateBinding Foreground}"
                    FontWeight="{TemplateBinding FontWeight}"
                    FontSize="{TemplateBinding FontSize}"
                    Text="{Binding Header}"
                    Margin="0 3 0 5"
                    FontFamily="{TemplateBinding FontFamily}"
                    Visibility="{Binding Header, Converter={StaticResource NullToVisibilityConverterInstance}}"/>
            <telerik:RadListBox
                    Grid.Row="1"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    mat:MaterialAssist.CornerRadius="0"
                    ItemsSource="{Binding ItemsSource}"
                    SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                    MinWidth="60">
                <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:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Margin" Value="5 5 5 0"/>
        <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}"/>
            <Border x:Name="FocusVisual"
                    Visibility="Collapsed"
                    Background="{x:Null}"
                    IsHitTestVisible="False"
                    BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"
                    Grid.ColumnSpan="2"/>
            <telerik:RadWatermarkTextBox x:Name="PART_TimeSpanInput"
                    AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                    AutomationProperties.HelpText="{TemplateBinding AutomationProperties.HelpText}"
                    AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}"
                    Text="{TemplateBinding TimeSpanText}"
                    WatermarkContent="{TemplateBinding TimeSpanWatermarkContent}"
                    WatermarkTemplate="{TemplateBinding TimeSpanWatermarkTemplate}"
                    TextAlignment="{TemplateBinding TextAlignment}"
                    TabIndex="0"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=BottomLeftTop}"
                    BorderBrush="{x:Null}"
                    FontSize="{TemplateBinding FontSize}"
                    Padding="{TemplateBinding Padding}"
                    MinHeight="0"
                    Focusable="{TemplateBinding Focusable}"
                    Style="{StaticResource TimeSpanPickerWatermarkTextBoxStyle}"/>
            <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"
                    BorderThickness="0"
                    Margin="0 1 1 1"
                    Padding="0"
                    UseLayoutRounding="False"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Stretch"
                    telerik:DropDownButtonExtensions.FocusContentOnOpen="True"
                    Focusable="False">
                <telerik:RadDropDownButton.DropDownContent>
                    <Grid Margin="5 0 5 5" MaxHeight="{TemplateBinding MaxDropDownHeight}" Width="{TemplateBinding DropDownWidth}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <mat:Shadow Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}" Grid.RowSpan="2" ShadowDepth="{TemplateBinding mat:MaterialAssist.ShadowDepth}"/>
                        <Border x:Name="BackgroundVisual"
                                Grid.RowSpan="2"
                                IsHitTestVisible="False"
                                Background="{telerik1:FluentResource ResourceKey=AlternativeBrush}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="0"/>
                        <ItemsControl
                                ItemContainerStyle="{TemplateBinding TimeSpanComponentStyle}"
                                ItemContainerStyleSelector="{TemplateBinding TimeSpanComponentStyleSelector}"
                                Focusable="False"
                                Background="Transparent"
                                Margin="5 0"
                                UseLayoutRounding="True">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <DockPanel/>
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </ItemsControl>
                        <Border x:Name="ButtonsContainer" Grid.Row="1" BorderThickness="0" BorderBrush="{x:Null}" Background="{x:Null}">
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="10 5">
                                <telerik:RadButton x:Name="PART_Clear"
                                        FocusVisualStyle="{x:Null}"
                                        telerik:LocalizationManager.ResourceKey="Clear"
                                        Command="{x:Static controls:TimeSpanPickerCommands.Clear}"
                                        KeyboardNavigation.TabNavigation="Once"/>
                                <telerik:RadButton x:Name="PART_Close"
                                        telerik:LocalizationManager.ResourceKey="Close"
                                        Command="{x:Static controls:TimeSpanPickerCommands.Close}"
                                        FocusVisualStyle="{x:Null}"
                                        KeyboardNavigation.TabNavigation="Once"
                                        Margin="5 0 0 0"/>
                            </StackPanel>
                        </Border>
                    </Grid>
                </telerik:RadDropDownButton.DropDownContent>
                <telerik:RadDropDownButton.Template>
                    <ControlTemplate TargetType="telerik:RadDropDownButton">
                        <Grid>
                            <Border x:Name="BackgroundVisual">
                                <mat:FluentControl BorderThickness="0" IsSmartClipped="True" EffectMode="Glow">
                                    <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                </mat:FluentControl>
                            </Border>
                            <Popup x:Name="DropDownPopup"
                                    AllowsTransparency="True"
                                    StaysOpen="False"
                                    Focusable="false"
                                    Placement="Bottom"
                                    HorizontalOffset="-5"
                                    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.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="BackgroundVisual" Property="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="BackgroundVisual" Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                            </Trigger>
                            <Trigger Property="IsOpen" Value="True">
                                <Setter TargetName="BackgroundVisual" Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </telerik:RadDropDownButton.Template>
                <Grid x:Name="DropDownIcon" VerticalAlignment="Center" Background="Transparent">
                    <telerik:RadGlyph x:Name="TimeSpanPickerIcon"
                            FlowDirection="LeftToRight"
                            FontSize="16"
                            Foreground="{telerik1:FluentResource ResourceKey=IconBrush}"
                            Margin="5 0"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Glyph="{StaticResource GlyphClock}"/>
                </Grid>
            </telerik:RadDropDownButton>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="PART_TimeSpanInput" Property="Opacity" Value="1"/>
                <Setter TargetName="PART_TimeSpanInput" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsDropDownOpen" Value="True">
                <Setter TargetName="PART_TimeSpanInput" Property="Opacity" Value="1"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
                <Setter TargetName="PART_TimeSpanInput" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="EditMode" Value="TextOnly">
                <Setter TargetName="PART_TimeSpanInput" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="TimeSpanPickerIcon" Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>

            <!-- Focused -->
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="IsDropDownOpen" Value="False"/>
                    <Condition Property="IsMouseOver" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
            </MultiTrigger>

            <!-- Focused and EditMode is TextOnly -->
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="IsDropDownOpen" Value="False"/>
                    <Condition Property="IsMouseOver" Value="False"/>
                    <Condition Property="EditMode" Value="TextOnly"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_TimeSpanInput" Property="Opacity" Value="1"/>
                <Setter TargetName="PART_TimeSpanInput" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
                <Setter TargetName="PART_TimeSpanInput" Property="BorderThickness" Value="{Binding ElementName=FocusVisual, Path=BorderThickness}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
            </MultiTrigger>

            <!-- Focused and EditMode is TextAndDropDown -->
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="True"/>
                    <Condition Property="IsDropDownOpen" Value="False"/>
                    <Condition Property="IsMouseOver" Value="False"/>
                    <Condition Property="EditMode" Value="TextAndDropDown"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_TimeSpanInput" Property="Opacity" Value="1"/>
                <Setter TargetName="PART_TimeSpanInput" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
                <Setter TargetName="PART_TimeSpanInput" Property="BorderThickness" Value="{Binding ElementName=FocusVisual, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=BottomLeftTop}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
            </MultiTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="EditMode" Value="None"/>
                    <Condition Property="IsMouseOver" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter TargetName="PART_TimeSpanInput" Property="BorderThickness" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness}"/>
            </MultiTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="RadTimeSpanPickerStyle" TargetType="controls:RadTimeSpanPicker">
        <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="Padding" Value="5 6 3 6"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="MaxDropDownHeight" Value="210"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="KeyboardNavigation.ControlTabNavigation" Value="Once"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
        <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}"/>
    <ControlTemplate x:Key="AutoSuggestBoxButtonTemplate" TargetType="telerik:RadButton">
        <Border x:Name="BorderVisual"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}"
                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
            <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>
    </ControlTemplate>
    <Style x:Key="AutoSuggestBoxButtonStyle" TargetType="telerik:RadButton">
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="4 0"/>
        <Setter Property="Template" Value="{StaticResource AutoSuggestBoxButtonTemplate}"/>
    </Style>
    <Style x:Key="AutoSuggestBoxClearButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource AutoSuggestBoxButtonStyle}">
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{telerik:FluentResource ResourceKey=AccentMouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{telerik:FluentResource ResourceKey=AccentPressedBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="AutoSuggestQueryButtonTemplate" TargetType="telerik:RadButton">
        <Border x:Name="BorderVisual"
                BorderThickness="{TemplateBinding BorderThickness}"
                BorderBrush="{TemplateBinding BorderBrush}"
                Background="{TemplateBinding Background}"
                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
            <mat:FluentControl
                    EffectMode="Glow"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    HorizontalContentAlignment="Stretch"
                    VerticalContentAlignment="Stretch">
                <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"/>
            </mat:FluentControl>
        </Border>
    </ControlTemplate>
    <Style x:Key="AutoSuggestQueryButtonStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource AutoSuggestBoxButtonStyle}">
        <Setter Property="Template" Value="{StaticResource AutoSuggestQueryButtonTemplate}"/>
        <Setter Property="mat:MaterialAssist.MouseOverBrush" Value="Transparent"/>
        <Setter Property="Margin" Value="0 1 1 1"/>
        <Setter Property="Padding" Value="5 0"/>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" Value="{telerik1:FluentResource ResourceKey=DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="RadAutoSuggestBoxTemplate" TargetType="controls:RadAutoSuggestBox">
        <Grid x:Name="RootElement">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Border x:Name="BorderVisual"
                    Grid.ColumnSpan="3"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}"/>
            <telerik:RadButton x:Name="PART_ClearButton"
                    Grid.Column="1"
                    AutomationProperties.Name="ClearButton"
                    KeyboardNavigation.IsTabStop="False"
                    Content="{TemplateBinding ClearButtonContent}"
                    ContentTemplate="{TemplateBinding ClearButtonContentTemplate}"
                    Command="{TemplateBinding ClearButtonCommand}"
                    CommandTarget="{Binding ElementName=PART_TextBox}"
                    Visibility="{TemplateBinding ClearButtonVisibility}"
                    Style="{StaticResource AutoSuggestBoxClearButtonStyle}"/>
            <telerik:RadButton x:Name="PART_QueryButton"
                    Grid.Column="2"
                    AutomationProperties.Name="QueryButton"
                    KeyboardNavigation.IsTabStop="False"
                    Content="{TemplateBinding QueryButtonContent}"
                    ContentTemplate="{TemplateBinding QueryButtonContentTemplate}"
                    Visibility="{TemplateBinding QueryButtonVisibility}"
                    Command="{TemplateBinding QueryButtonCommand}"
                    mat:MaterialAssist.IsShadowDisabled="True"
                    Style="{StaticResource AutoSuggestQueryButtonStyle}"/>
            <telerik:RadWatermarkTextBox x:Name="PART_TextBox"
                    Grid.Column="0"
                    AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
                    AutomationProperties.HelpText="{TemplateBinding AutomationProperties.HelpText}"
                    AutomationProperties.LabeledBy="{TemplateBinding AutomationProperties.LabeledBy}"
                    mat:MaterialAssist.FocusBrush="{x:Null}"
                    WatermarkContent="{TemplateBinding WatermarkContent}"
                    WatermarkTemplate="{TemplateBinding WatermarkTemplate}"
                    WatermarkBehavior="{TemplateBinding WatermarkBehavior}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    BorderBrush="{x:Null}"
                    Background="{x:Null}"
                    Foreground="{TemplateBinding Foreground}"
                    FontSize="{TemplateBinding FontSize}"
                    FontFamily="{TemplateBinding FontFamily}"
                    ReadOnlyBackground="{x:Null}"
                    DisabledBackground="{x:Null}"
                    Padding="{TemplateBinding Padding}"
                    Focusable="{TemplateBinding Focusable}"
                    MinHeight="0"
                    Margin="0"
                    BorderThickness="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness, Converter={StaticResource ThicknessToOrientedThicknessConverter}, ConverterParameter=BottomLeftTop}"/>
            <Border x:Name="FocusVisual"
                    Background="{x:Null}"
                    IsHitTestVisible="False"
                    BorderBrush="{TemplateBinding mat:MaterialAssist.FocusBrush}"
                    Grid.ColumnSpan="3"
                    Visibility="Collapsed"
                    BorderThickness="{telerik1:FluentResource ResourceKey=FocusThickness}"/>
            <Popup x:Name="PART_Popup" Focusable="{TemplateBinding Focusable}">
                <Grid x:Name="PopupRoot"
                        MinWidth="{TemplateBinding MinDropDownWidth}"
                        Width="{TemplateBinding ActualWidth}"
                        MaxWidth="{TemplateBinding MaxDropDownWidth}"
                        MaxHeight="{TemplateBinding MaxDropDownHeight}"
                        Margin="5 0 5 5">
                    <telerik:RadListBox x:Name="PART_ItemsHost"
                            ScrollViewer.CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
                            ItemsSource="{TemplateBinding ItemsSource}"
                            DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            EnableSelectionCaching="False"
                            IsSynchronizedWithCurrentItem="False"
                            GroupStyleSelector="{TemplateBinding GroupStyleSelector}"
                            ItemTemplate="{TemplateBinding ItemTemplate}"
                            ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                            ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
                            ItemContainerStyleSelector="{TemplateBinding ItemContainerStyleSelector}"
                            ItemsPanel="{TemplateBinding ItemsPanel}"/>
                    <Border
                            Background="{Binding Background, ElementName=PART_ItemsHost}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1"
                            Visibility="{Binding ElementName=PART_NoResultsPresenter, Path=Visibility}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <ContentPresenter x:Name="PART_NoResultsPresenter" ContentSource="NoResultsContent" Margin="4 3" Visibility="Collapsed">
                            <ContentPresenter.Resources>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
                                    <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
                                </Style>
                            </ContentPresenter.Resources>
                        </ContentPresenter>
                    </Border>
                </Grid>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger SourceName="PART_ItemsHost" Property="Visibility" Value="Collapsed">
                <Setter TargetName="PART_NoResultsPresenter" Property="Visibility" Value="Visible"/>
            </Trigger>

            <!-- MouseOver -->
            <Trigger Property="IsMouseOver" Value="True">
                <Setter TargetName="PART_TextBox" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
            </Trigger>

            <!-- Focused -->
            <Trigger Property="IsKeyboardFocusWithin" Value="True">
                <Setter TargetName="FocusVisual" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PART_ClearButton" Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryMouseOverBrush}"/>
                <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerMouseOverBrush}"/>
            </Trigger>

            <!-- Padding -->
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=QueryButtonVisibility}" Value="Collapsed"/>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ClearButtonVisibility}" Value="Collapsed"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Padding" Value="4 0"/>
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=QueryButtonVisibility}" Value="Collapsed"/>
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=ClearButtonVisibility}" Value="Auto"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Padding" Value="4 0"/>
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <DataTemplate x:Key="AutoSuggestBoxButtonsContentTemplate">
        <telerik:RadGlyph Glyph="{Binding}" FontSize="16"/>
    </DataTemplate>
    <Style x:Key="RadAutoSuggestBoxStyle" TargetType="controls:RadAutoSuggestBox">
        <Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
        <Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
        <Setter Property="Foreground" Value="{telerik1:FluentResource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik1:FluentResource ResourceKey=PrimaryBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicBrush}"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="helpers:ThemeHelper.CornerRadius" Value="{telerik1:FluentResource ResourceKey=CornerRadius}"/>
        <Setter Property="mat:MaterialAssist.ShadowDepth" Value="Depth1"/>
        <Setter Property="mat:MaterialAssist.FocusBrush" Value="{telerik1:FluentResource ResourceKey=AccentFocusedBrush}"/>
        <Setter Property="Padding" Value="4 0 0 0"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
        <Setter Property="QueryButtonContent" Value="{StaticResource GlyphZoom}"/>
        <Setter Property="ClearButtonContent" Value="{StaticResource GlyphClose}"/>
        <Setter Property="Template" Value="{StaticResource RadAutoSuggestBoxTemplate}"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
        <Setter Property="ClearButtonContentTemplate" Value="{StaticResource AutoSuggestBoxButtonsContentTemplate}"/>
        <Setter Property="QueryButtonContentTemplate" Value="{StaticResource AutoSuggestBoxButtonsContentTemplate}"/>
        <Setter Property="ClearButtonCommand" Value="{x:Static telerik:RadWatermarkTextBoxCommands.Clear}"/>
        <Setter Property="QueryButtonCommand" Value="{x:Static telerik:RadAutoSuggestBoxCommands.SubmitQuery}"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:RadAutoSuggestBox" BasedOn="{StaticResource RadAutoSuggestBoxStyle}"/>
</ResourceDictionary>
