<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="c"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls">
    <LinearGradientBrush x:Key="CheckBoxBorder" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FF707070" Offset="0"/>
        <GradientStop Color="#FFA3A3A3" Offset="0.5"/>
        <GradientStop Color="#FF707070" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="CheckBoxBackground" Color="#FF575859"/>
    <SolidColorBrush x:Key="CheckBoxForeground" Color="#FFDDDDDD"/>
    <LinearGradientBrush x:Key="CheckBoxBorder_MouseOver" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FFB0B0B0" Offset="0"/>
        <GradientStop Color="#FFB0B0B0" Offset="1"/>
        <GradientStop Color="#FFE0E1E2" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="CheckBoxBackground_MouseOver" Color="#FF878787"/>
    <LinearGradientBrush x:Key="CheckBoxBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF616060" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
        <GradientStop Color="#FFCDCDCD" Offset="0.14"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="CheckBoxBorder_Pressed" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FF595959" Offset="0"/>
        <GradientStop Color="#FF595959" Offset="1"/>
        <GradientStop Color="#FFA3A3A3" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="CheckBoxBorder_Disabled" Color="#FF5D5C5C"/>
    <SolidColorBrush x:Key="CheckBoxBackground_Disabled" Color="#FF666666"/>
    <SolidColorBrush x:Key="CheckBoxBorder_Focused" Color="#FF789FC3"/>
    <SolidColorBrush x:Key="CheckBoxTick" Color="#FFDDDDDD"/>
    <SolidColorBrush x:Key="CheckBoxTick_MouseOver" Color="#FF262626"/>
    <SolidColorBrush x:Key="CheckBoxTick_Disabled" Color="#FF868686"/>
    <LinearGradientBrush x:Key="StatusBar_BorderBrush" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FF707070" Offset="0"/>
        <GradientStop Color="#FF707070" Offset="1"/>
        <GradientStop Color="#FFA3A3A3" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="StatusBar_Background" Color="#FF494A4D"/>
    <SolidColorBrush x:Key="Separator_Background" Color="#FF707070"/>
    <SolidColorBrush x:Key="Separator_BorderBrush" Color="#FF3D3D3D"/>
    <SolidColorBrush x:Key="ToolTip_Background" Color="#FF3D3D3D"/>
    <SolidColorBrush x:Key="ToolTip_OuterBorder" Color="#FF595959"/>
    <SolidColorBrush x:Key="ToolTip_Foreground" Color="#FFDDDDDD"/>
    <CornerRadius x:Key="ToolTip_CornerRadius">3</CornerRadius>
    <SolidColorBrush x:Key="TextBoxBackground" Color="#FF333333"/>
    <SolidColorBrush x:Key="TextBoxBackground_ReadOnly" Color="#5EC9C9C9"/>
    <CornerRadius x:Key="ControlOuterBorder_CornerRadius">3</CornerRadius>
    <SolidColorBrush x:Key="ControlOuterBorder" Color="#FF595959"/>
    <SolidColorBrush x:Key="ControlBackground" Color="#FF3D3D3D"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FF5D5C5C"/>
    <SolidColorBrush x:Key="ControlBackground_Disabled" Color="#FF666666"/>
    <SolidColorBrush x:Key="ControlForeground_Normal" Color="#FFDDDDDD"/>
    <LinearGradientBrush x:Key="ControlOuterBorder_Normal" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FF707070" Offset="0"/>
        <GradientStop Color="#FFA3A3A3" Offset="0.5"/>
        <GradientStop Color="#FF707070" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlBackground_Normal" Color="#FF575859"/>
    <LinearGradientBrush x:Key="ControlOuterBorder_MouseOver" EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="#FFB0B0B0" Offset="0"/>
        <GradientStop Color="#FFB0B0B0" Offset="1"/>
        <GradientStop Color="#FFE0E1E2" Offset="0.5"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlBackground_MouseOver" Color="#FF878787"/>
    <SolidColorBrush x:Key="ControlForeground_Pressed" Color="#FFC5C2C2"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Pressed" Color="#FF1A1A1A"/>
    <LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF2E2D2D" Offset="0"/>
        <GradientStop Color="#FF424242" Offset="1"/>
        <GradientStop Color="#FF424242" Offset="0.14"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ControlForeground_Active" Color="#FF262626"/>
    <SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF789FC3"/>
    <SolidColorBrush x:Key="ControlSubItem_Background_MouseOver" Color="#FF878787"/>
    <LinearGradientBrush x:Key="ControlSubItem_Background_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF616060" Offset="0"/>
        <GradientStop Color="#FFCDCDCD" Offset="1"/>
        <GradientStop Color="#FFCDCDCD" Offset="0.14"/>
    </LinearGradientBrush>
    <CornerRadius x:Key="ControlSubItem_OuterCornerRadius">0</CornerRadius>
    <CornerRadius x:Key="ValidationTooltipCornerRadius">3</CornerRadius>
    <CornerRadius x:Key="ValidationTooltip_CornerRadius">2.5</CornerRadius>
    <SolidColorBrush x:Key="ValidationTooltipForeground" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ValidationTooltipOuterBorder" Color="#FFDC000C"/>
    <SolidColorBrush x:Key="ValidationTooltipBorder" Color="#FF9A0000"/>
    <LinearGradientBrush x:Key="ValidationTooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFF424C" Offset="1"/>
        <GradientStop Color="#FFC92931"/>
    </LinearGradientBrush>
    <ControlTemplate x:Key="ErrorTooltipTemplate" TargetType="ToolTip">
        <Grid x:Name="RootVisual" HorizontalAlignment="Right" RenderTransformOrigin="0 0" Opacity="0" Margin="2 0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition To="Open" GeneratedDuration="0:0:0.2">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2">
                                    <DoubleAnimation.EasingFunction>
                                        <BackEase Amplitude=".3" EasingMode="EaseOut"/>
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                                <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"/>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0"/>
                            <DoubleAnimation Storyboard.TargetName="RootVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Border
                    MinHeight="22"
                    Background="{StaticResource ValidationTooltipBackground}"
                    BorderBrush="{StaticResource ValidationTooltipBorder}"
                    BorderThickness="1"
                    CornerRadius="{StaticResource ValidationTooltipCornerRadius}">
                <ContentPresenter TextBlock.Foreground="{StaticResource ValidationTooltipForeground}" Content="{Binding ErrorContent}" Margin="4 1"/>
            </Border>
            <ContentControl/>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ValidationTooltipTemplate">
        <Grid SnapsToDevicePixels="True" VerticalAlignment="Top">
            <Border Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Width="3" Height="3"/>
            <AdornedElementPlaceholder x:Name="Holder"/>
            <Border BorderBrush="{StaticResource ValidationTooltipOuterBorder}" BorderThickness="1" CornerRadius="{StaticResource ValidationTooltip_CornerRadius}"/>
            <Path Data="M0,1 L6,1 6,7 Z" Fill="{StaticResource ValidationTooltipBorder}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <Path x:Name="InvisibleHitArea" Data="M0,0 9,0 9,9 8,9 0,1 Z" Fill="Blue" Opacity="0" Margin="-1" Width="9" Height="9" HorizontalAlignment="Right" VerticalAlignment="Top"/>
            <ToolTipService.ToolTip>
                <ToolTip x:Name="PART_ToolTip"
                        DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=PlacementTarget.DataContext}"
                        Template="{StaticResource ErrorTooltipTemplate}"
                        Placement="Right"/>
            </ToolTipService.ToolTip>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
        <Grid x:Name="root" UseLayoutRounding="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="(TextBlock.Foreground)">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusState"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
            <ContentPresenter x:Name="ContentElement"
                    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
                    BorderThickness="1"
                    CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                    Opacity="0"
                    x:Name="FocusState"
                    BorderBrush="{StaticResource ControlOuterBorder_Focused}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ButtonStyle" TargetType="Button">
        <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
    <SolidColorBrush x:Key="ScrollBarBackground" Color="#FF3D3D3D"/>
    <SolidColorBrush x:Key="ScrollButton" Color="#FF808080"/>
    <SolidColorBrush x:Key="ScrollButton_MouseOver" Color="#FFAAAAAA"/>
    <ControlTemplate x:Key="ScrollThumbTemplate" TargetType="Thumb">
        <Border Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Visibility">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Collapsed</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Background">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ButtonIcon" CornerRadius="3" Margin="{TemplateBinding Padding}" Background="{StaticResource ScrollButton}"/>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="LargeStepButtonTemplate" TargetType="RepeatButton">
        <Rectangle Fill="Transparent"/>
    </ControlTemplate>
    <ControlTemplate x:Key="HorizontalSmallIncreaseTemplate" TargetType="RepeatButton">
        <Border Background="Transparent" Padding="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation To="0.27" Duration="0" Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Path x:Name="ButtonIcon"
                    Data="M0,0 L6,3.5 0,7Z"
                    StrokeThickness="0"
                    Fill="{StaticResource ScrollButton}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Stretch="None"/>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="HorizontalSmallDecreaseTemplate" TargetType="RepeatButton">
        <Border Background="Transparent" Padding="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation To="0.27" Duration="0" Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Path x:Name="ButtonIcon"
                    Data="M6,0 L0,3.5 6,7Z"
                    StrokeThickness="0"
                    Fill="{StaticResource ScrollButton}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Stretch="None"/>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="VerticalSmallDecreaseTemplate" TargetType="RepeatButton">
        <Border Background="Transparent" Padding="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation To="0.27" Duration="0" Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Path x:Name="ButtonIcon"
                    Data="M0,6 L3.5,0 7,6Z"
                    StrokeThickness="0"
                    Fill="{StaticResource ScrollButton}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Stretch="None"/>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="VerticalSmallIncreaseTemplate" TargetType="RepeatButton">
        <Border Background="Transparent" Padding="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Fill">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ScrollButton_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation To="0.27" Duration="0" Storyboard.TargetName="ButtonIcon" Storyboard.TargetProperty="Opacity"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Path x:Name="ButtonIcon"
                    Data="M0,0 L3.5,6 7,0Z"
                    StrokeThickness="0"
                    Fill="{StaticResource ScrollButton}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Stretch="None"/>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="HorizontalScrollBarControlTemplate" TargetType="ScrollBar">
        <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <RepeatButton x:Name="HorizontalSmallDecrease"
                        Focusable="False"
                        MinHeight="0"
                        Grid.Column="0"
                        FocusVisualStyle="{x:Null}"
                        Template="{StaticResource HorizontalSmallDecreaseTemplate}"
                        Padding="0 0 0 1"
                        IsTabStop="False"
                        Interval="50"
                        Width="18"
                        Command="{x:Static ScrollBar.LineLeftCommand}"/>
                <Track x:Name="PART_Track" Grid.Column="1">
                    <Track.Resources>

                        <!-- Thumb's minimum width is half of this metric -->
                        <sys:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}">36</sys:Double>
                    </Track.Resources>
                    <Track.DecreaseRepeatButton>
                        <RepeatButton x:Name="HorizontalLargeDecrease"
                                FocusVisualStyle="{x:Null}"
                                Template="{StaticResource LargeStepButtonTemplate}"
                                IsTabStop="False"
                                Interval="50"
                                Command="{x:Static ScrollBar.PageLeftCommand}"/>
                    </Track.DecreaseRepeatButton>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton x:Name="HorizontalLargeIncrease"
                                FocusVisualStyle="{x:Null}"
                                Template="{StaticResource LargeStepButtonTemplate}"
                                IsTabStop="False"
                                Interval="50"
                                Command="{x:Static ScrollBar.PageRightCommand}"/>
                    </Track.IncreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb x:Name="HorizontalThumb" Padding="0 5 0 6" Template="{StaticResource ScrollThumbTemplate}"/>
                    </Track.Thumb>
                </Track>
                <RepeatButton
                        Focusable="False"
                        x:Name="HorizontalSmallIncrease"
                        MinHeight="0"
                        FocusVisualStyle="{x:Null}"
                        Grid.Column="2"
                        Template="{StaticResource HorizontalSmallIncreaseTemplate}"
                        Padding="0 0 0 1"
                        IsTabStop="False"
                        Interval="50"
                        Width="18"
                        Command="{x:Static ScrollBar.LineRightCommand}"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <ControlTemplate x:Key="VerticalScrollBarControlTemplate" TargetType="ScrollBar">
        <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <RepeatButton x:Name="VerticalSmallDecrease"
                        Focusable="False"
                        MinHeight="0"
                        FocusVisualStyle="{x:Null}"
                        Template="{StaticResource VerticalSmallDecreaseTemplate}"
                        Padding="0 0 1 0"
                        Height="18"
                        IsTabStop="False"
                        Interval="50"
                        Command="{x:Static ScrollBar.LineUpCommand}"/>
                <Track x:Name="PART_Track" IsDirectionReversed="true" Grid.Row="1">
                    <Track.Resources>

                        <!-- Thumb's minimum height is half of this metric -->
                        <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">36</sys:Double>
                    </Track.Resources>
                    <Track.DecreaseRepeatButton>
                        <RepeatButton x:Name="VerticalLargeDecrease"
                                FocusVisualStyle="{x:Null}"
                                Template="{StaticResource LargeStepButtonTemplate}"
                                IsTabStop="False"
                                Interval="50"
                                Command="{x:Static ScrollBar.PageUpCommand}"/>
                    </Track.DecreaseRepeatButton>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton x:Name="VerticalLargeIncrease"
                                FocusVisualStyle="{x:Null}"
                                Template="{StaticResource LargeStepButtonTemplate}"
                                IsTabStop="False"
                                Interval="50"
                                Command="{x:Static ScrollBar.PageDownCommand}"/>
                    </Track.IncreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb x:Name="VerticalThumb" Padding="5 0 6 0" Template="{StaticResource ScrollThumbTemplate}"/>
                    </Track.Thumb>
                </Track>
                <RepeatButton x:Name="VerticalSmallIncrease"
                        Focusable="False"
                        MinHeight="0"
                        FocusVisualStyle="{x:Null}"
                        Grid.Row="2"
                        Template="{StaticResource VerticalSmallIncreaseTemplate}"
                        Padding="0 0 1 0"
                        Height="18"
                        IsTabStop="False"
                        Interval="50"
                        Command="{x:Static ScrollBar.LineDownCommand}"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="ScrollBarStyle" TargetType="ScrollBar">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="MinWidth" Value="18"/>
        <Setter Property="MinHeight" Value="18"/>
        <Setter Property="Height" Value="Auto"/>
        <Setter Property="Width" Value="Auto"/>
        <Setter Property="Background" Value="{StaticResource ScrollBarBackground}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Template" Value="{StaticResource VerticalScrollBarControlTemplate}"/>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Template" Value="{StaticResource HorizontalScrollBarControlTemplate}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <ControlTemplate x:Key="ScrollViewerControlTemplate" TargetType="ScrollViewer">
        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                        Margin="{TemplateBinding Padding}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        CanContentScroll="{TemplateBinding CanContentScroll}"/>
                <Rectangle Grid.Column="1" Fill="{StaticResource ScrollBarBackground}" Grid.Row="1"/>
                <ScrollBar x:Name="PART_VerticalScrollBar"
                        Grid.Column="1"
                        IsTabStop="False"
                        Maximum="{TemplateBinding ScrollableHeight}"
                        Minimum="0"
                        Orientation="Vertical"
                        Grid.Row="0"
                        Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                        Value="{TemplateBinding VerticalOffset}"
                        ViewportSize="{TemplateBinding ViewportHeight}"/>
                <ScrollBar x:Name="PART_HorizontalScrollBar"
                        Grid.Column="0"
                        IsTabStop="False"
                        Maximum="{TemplateBinding ScrollableWidth}"
                        Minimum="0"
                        Orientation="Horizontal"
                        Grid.Row="1"
                        Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                        Value="{TemplateBinding HorizontalOffset}"
                        ViewportSize="{TemplateBinding ViewportWidth}"/>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="ScrollViewerStyle" TargetType="ScrollViewer">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template" Value="{StaticResource ScrollViewerControlTemplate}"/>
    </Style>
    <Style BasedOn="{StaticResource ScrollBarStyle}" TargetType="ScrollBar"/>
    <Style BasedOn="{StaticResource ScrollViewerStyle}" TargetType="ScrollViewer"/>
    <ControlTemplate x:Key="CheckBoxControlTemplate" TargetType="CheckBox">
        <Grid Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="IndeterminateVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckedVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Stroke">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateVisual" Storyboard.TargetProperty="Stroke">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Unchecked"/>
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckedVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Indeterminate">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IndeterminateVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="0" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Center">
                <Border x:Name="BackgroundVisual" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"/>
                <Border x:Name="MouseStatesVisual"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{StaticResource CheckBoxBackground_MouseOver}"
                        BorderBrush="{StaticResource CheckBoxBorder_MouseOver}"
                        Visibility="Collapsed"/>
                <Border x:Name="FocusStatesVisual" BorderThickness="1" BorderBrush="{StaticResource CheckBoxBorder_Focused}" Visibility="Collapsed"/>
                <Border BorderThickness="{TemplateBinding BorderThickness}" FlowDirection="LeftToRight">
                    <Grid x:Name="CheckMarks" Width="10" Height="10">
                        <Path x:Name="CheckedVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L4,7 7.5,2" StrokeThickness="1.5" Stretch="None"/>
                        <Path x:Name="IndeterminateVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L8,5" StrokeThickness="2" Stretch="None"/>
                    </Grid>
                </Border>
            </Grid>
            <ContentPresenter x:Name="ContentVisual"
                    Grid.Column="1"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    RecognizesAccessKey="True"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="CheckBoxStyle" TargetType="CheckBox">
        <Setter Property="Template" Value="{StaticResource CheckBoxControlTemplate}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource CheckBoxBorder}"/>
        <Setter Property="Background" Value="{StaticResource CheckBoxBackground}"/>
        <Setter Property="Foreground" Value="{StaticResource CheckBoxForeground}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="4 0 0 0"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Width="15" HorizontalAlignment="Left">
                        <Border Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Width="5" Height="5"/>
                        <AdornedElementPlaceholder x:Name="Holder"/>
                        <Grid Width="12" Height="12" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="2 0 0 0">
                            <Border BorderBrush="{StaticResource ValidationTooltipOuterBorder}" BorderThickness="1" SnapsToDevicePixels="True"/>
                            <Path
                                    Data="M0,1 L6,1 6,7 Z"
                                    Fill="{StaticResource ValidationTooltipBorder}"
                                    Width="7"
                                    Height="7"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Top"
                                    SnapsToDevicePixels="True"/>
                            <Path x:Name="InvisibleHitArea" Data="M0,0 9,0 9,9 8,9 0,1 Z" Fill="Blue" Opacity="0" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
                        </Grid>
                        <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>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="CheckBox" BasedOn="{StaticResource CheckBoxStyle}"/>
    <Style x:Key="TextBoxStyle" TargetType="TextBox">
        <Setter Property="Background" Value="{StaticResource TextBoxBackground}"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="telerik:CaretBrushHelper.CaretBrush" Value="#FFDDDDDD"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Padding" Value="3 2 3 2"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid x:Name="RootElement" UseLayoutRounding="True" SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Hover" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderThickness">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>0</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="Margin">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>1 1 1 1</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Hover" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
                            <Grid>
                                <Border x:Name="ReadOnlyVisualElement"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                                        Background="{StaticResource TextBoxBackground_ReadOnly}"
                                        Opacity="0"/>
                                <ScrollViewer x:Name="PART_ContentHost"
                                        Padding="{TemplateBinding Padding}"
                                        Foreground="{TemplateBinding Foreground}"
                                        Background="Transparent"
                                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                            </Grid>
                        </Border>
                        <Border x:Name="Hover"
                                Background="Transparent"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsHitTestVisible="False"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                        <Border x:Name="FocusedVisual"
                                Background="Transparent"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsHitTestVisible="False"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle}"/>
    <ControlTemplate x:Key="RadioButtonControlTemplate" TargetType="RadioButton">
        <Grid Background="Transparent">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="IndeterminateVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="CheckedVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" To="0.27" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentVisual"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Stroke">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateVisual" Storyboard.TargetProperty="Stroke">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxTick_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusStatesVisual"/>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBackground_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="MouseStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxBorder_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                    <VisualState x:Name="Unchecked"/>
                    <VisualState x:Name="Checked">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckedVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Indeterminate">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IndeterminateVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusStatesVisual">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="0" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Center">
                <Border x:Name="BackgroundVisual"
                        CornerRadius="6"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"/>
                <Border x:Name="MouseStatesVisual"
                        CornerRadius="6"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{StaticResource CheckBoxBackground_MouseOver}"
                        BorderBrush="{StaticResource CheckBoxBorder_MouseOver}"
                        Visibility="Collapsed"/>
                <Border x:Name="FocusStatesVisual"
                        CornerRadius="6"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{StaticResource CheckBoxBorder_Focused}"
                        Visibility="Collapsed"/>
                <Border BorderThickness="{TemplateBinding BorderThickness}">
                    <Grid x:Name="CheckMarks" Width="10" Height="10">
                        <Path x:Name="CheckedVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L4,7 7.5,2" StrokeThickness="1.5" Stretch="None"/>
                        <Path x:Name="IndeterminateVisual" Visibility="Collapsed" Stroke="{StaticResource CheckBoxTick}" Data="M2,5 L8,5" StrokeThickness="2" Stretch="None"/>
                    </Grid>
                </Border>
            </Grid>
            <ContentPresenter x:Name="ContentVisual"
                    Grid.Column="1"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    RecognizesAccessKey="True"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RadioButtonStyle" TargetType="RadioButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource CheckBoxBorder}"/>
        <Setter Property="Background" Value="{StaticResource CheckBoxBackground}"/>
        <Setter Property="Foreground" Value="{StaticResource CheckBoxForeground}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="4 0 0 0"/>
        <Setter Property="Template" Value="{StaticResource RadioButtonControlTemplate}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style TargetType="RadioButton" BasedOn="{StaticResource RadioButtonStyle}"/>
    <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation BeginTime="0" Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MouseOverState"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Active}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetName="SelectedState" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" BeginTime="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedState"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Active}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border
                                CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
                                Margin="1 0"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"/>
                        <Border x:Name="MouseOverState"
                                Opacity="0"
                                Margin="1 0"
                                CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
                                Background="{StaticResource ControlSubItem_Background_MouseOver}"/>
                        <Border x:Name="SelectedState"
                                Opacity="0"
                                Margin="1 0"
                                CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
                                Background="{StaticResource ControlSubItem_Background_Selected}"/>
                        <ContentControl x:Name="contentPresenter"
                                Margin="{TemplateBinding Padding}"
                                IsTabStop="False"
                                Foreground="{TemplateBinding Foreground}"
                                FocusVisualStyle="{x:Null}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Content="{TemplateBinding Content}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                        <Border x:Name="FocusVisual"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                CornerRadius="{StaticResource ControlSubItem_OuterCornerRadius}"
                                Opacity="0"
                                Margin="1 0"
                                BorderThickness="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ListBoxStyle" TargetType="ListBox">
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <ScrollViewer x:Name="ScrollViewer"
                            Margin="0"
                            ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                            ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <ItemsPresenter/>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
    <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
    <Style x:Key="PasswordBoxStyle" TargetType="PasswordBox">
        <Setter Property="Background" Value="{StaticResource TextBoxBackground}"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="telerik:CaretBrushHelper.CaretBrush" Value="#FFDDDDDD"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Padding" Value="3 2 3 2"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="PasswordBox">
                    <Grid x:Name="RootElement" UseLayoutRounding="True" SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Hover" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="PART_ContentHost" Storyboard.TargetProperty="Opacity" To="0.3"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Hover" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="OuterBorder"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}">
                            <ScrollViewer x:Name="PART_ContentHost"
                                    Padding="{TemplateBinding Padding}"
                                    BorderThickness="0"
                                    Foreground="{TemplateBinding Foreground}"
                                    Background="Transparent"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                        </Border>
                        <Border x:Name="Hover"
                                Background="Transparent"
                                BorderBrush="{StaticResource ControlOuterBorder_MouseOver}"
                                Opacity="0"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsHitTestVisible="False"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                        <Border x:Name="FocusedVisual"
                                Background="Transparent"
                                BorderBrush="{StaticResource ControlOuterBorder_Focused}"
                                Visibility="Collapsed"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsHitTestVisible="False"
                                CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="PasswordBox" BasedOn="{StaticResource PasswordBoxStyle}"/>
    <ControlTemplate x:Key="RepeatButton_Template" TargetType="RepeatButton">
        <Grid x:Name="root" UseLayoutRounding="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_MouseOver}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlForeground_Pressed}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="BorderBrush" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlOuterBorder_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0:0:0">
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ControlBackground_Disabled}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimation Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusState"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Unfocused"/>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="Border"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Background="{TemplateBinding Background}"
                    CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"/>
            <ContentControl x:Name="ContentElement"
                    IsTabStop="False"
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Foreground="{TemplateBinding Foreground}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            <Border
                    BorderThickness="1"
                    CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}"
                    Opacity="0"
                    x:Name="FocusState"
                    BorderBrush="{StaticResource ControlOuterBorder_Focused}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
        <Setter Property="Template" Value="{StaticResource RepeatButton_Template}"/>
        <Setter Property="Background" Value="{StaticResource ControlBackground_Normal}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="MinHeight" Value="22"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
    <Style x:Key="ToolTipStyle" TargetType="ToolTip">
        <Setter Property="Background" Value="{StaticResource ToolTip_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ToolTip_OuterBorder}"/>
        <Setter Property="Foreground" Value="{StaticResource ToolTip_Foreground}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5 1"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Grid>
                        <Border
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Margin="0 0 2 2"
                                CornerRadius="{StaticResource ToolTip_CornerRadius}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ToolTip" BasedOn="{StaticResource ToolTipStyle}"/>

    <!-- Style for Separator which is not child of StatusBar (horizontal one) -->
    <Style x:Key="SeparatorStyle" TargetType="Separator">
        <Setter Property="Background" Value="{StaticResource Separator_Background}"/>
        <Setter Property="BorderBrush" Value="{StaticResource Separator_BorderBrush}"/>
        <Setter Property="BorderThickness" Value="0 0 0 1"/>
        <Setter Property="MinHeight" Value="2"/>
        <Setter Property="Margin" Value="0 2"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Separator">
                    <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Style for Separator which is child of StatusBar (vertical one) -->
    <Style x:Key="{x:Static StatusBar.SeparatorStyleKey}" TargetType="Separator">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="BorderBrush" Value="{StaticResource Separator_BorderBrush}"/>
        <Setter Property="Background" Value="{StaticResource Separator_Background}"/>
        <Setter Property="BorderThickness" Value="0 0 1 0"/>
        <Setter Property="MinWidth" Value="2"/>
        <Setter Property="Margin" Value="3 2"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Separator">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Style for StatusBarItem -->
    <Style x:Key="StatusBarItemStyle" TargetType="StatusBarItem">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="StatusBarItem">
                    <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <ContentPresenter x:Name="contentPresenter"
                                SnapsToDevicePixels="true"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Resources>
            <Style TargetType="Separator" BasedOn="{StaticResource {x:Static StatusBar.SeparatorStyleKey}}">
                <Setter Property="Margin" Value="3 -1"/>
            </Style>
        </Style.Resources>
    </Style>

    <!-- Style for StatusBar -->
    <Style x:Key="StatusBarStyle" TargetType="StatusBar">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="BorderThickness" Value="0 1 0 0"/>
        <Setter Property="BorderBrush" Value="{StaticResource StatusBar_BorderBrush}"/>
        <Setter Property="Background" Value="{StaticResource StatusBar_Background}"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="StatusBar">
                    <Grid>
                        <Border
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Resources>
            <Style TargetType="Separator" BasedOn="{StaticResource {x:Static StatusBar.SeparatorStyleKey}}"/>
        </Style.Resources>
    </Style>
    <Style TargetType="StatusBar" BasedOn="{StaticResource StatusBarStyle}"/>
    <Style TargetType="StatusBarItem" BasedOn="{StaticResource StatusBarItemStyle}"/>
    <Style TargetType="Separator" BasedOn="{StaticResource SeparatorStyle}"/>
</ResourceDictionary>
