Click here to Skip to main content
15,892,643 members
Articles / Programming Languages / C#

Silverlight Dynamic Themes

Rate me:
Please Sign up or sign in to vote.
4.92/5 (11 votes)
6 Jan 2012CPOL6 min read 56.6K   5.9K   29  
This article describes how to dynamically apply themes to a Silverlight application.
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
    xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns:dataPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"         
    xmlns:System_Windows_Controls_Primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
    mc:Ignorable="d">

    <!-- Global Settings-->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/SLDynamicThemes2;component/Assets/Themes/Cosmopolitan/CoreStyles.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!--DataGridCell Style-->
    <Style TargetType="data:DataGridCell" x:Key="DefaultDataGridCellStyle">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="data:DataGridCell">
                    <Grid x:Name="Root" Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CurrentStates">
                                <VisualState x:Name="Regular"/>
                                <VisualState x:Name="Current">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual" From="0.3"/>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="Invalid">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement"/>
                                        <ColorAnimation Duration="0" To="{StaticResource WhiteColor}" Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="FocusVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="FocusVisual" HorizontalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" StrokeThickness="1" VerticalAlignment="Stretch">
                            <Rectangle.Stroke>
                                <SolidColorBrush Color="{StaticResource Gray2}"/>
                            </Rectangle.Stroke>
                        </Rectangle>
                        <Rectangle x:Name="SelectedRectangle" Grid.Column="0" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource NormalBrush}"/>
                        <Rectangle x:Name="MouseOverRectangle" Grid.Column="0" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}"/>
                        <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Rectangle x:Name="InvalidVisualElement" HorizontalAlignment="Stretch" IsHitTestVisible="False" Opacity="0" Stroke="{StaticResource ControlsValidationBrush}" StrokeThickness="1" VerticalAlignment="Stretch"/>
                        <Rectangle x:Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DataGridColumnHeader Style-->
    <Style TargetType="dataPrimitives:DataGridColumnHeader" x:Key="DefaultDataGridColumnHeaderStyle">
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ControlTitleBigFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SeparatorBrush" Value="{StaticResource SeperatorBrush}"/>
        <Setter Property="Padding" Value="4,5,4,5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="dataPrimitives:DataGridColumnHeader">
                    <Border BorderBrush="Black" BorderThickness="0,1">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverLeftRightSeperator">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PressedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PressedLeftRightSeperator">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SortStates">
                                <VisualState x:Name="Unsorted"/>
                                <VisualState x:Name="SortAscending">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SortDescending">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon"/>
                                        <DoubleAnimation Duration="0" To="-.9" Storyboard.TargetProperty="(RenderTransform).ScaleY" Storyboard.TargetName="SortIcon"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="Root" Height="44">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Stretch="Fill" Fill="{StaticResource WhiteBrush}"/>

                            <Rectangle x:Name="MouseOverRectangle" Grid.ColumnSpan="2" Opacity="0">
                                <Rectangle.Fill>
                                    <SolidColorBrush Color="{StaticResource Gray8}"/>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle x:Name="PressedRectangle" Grid.ColumnSpan="2" Opacity="0">
                                <Rectangle.Fill>
                                    <SolidColorBrush Color="{StaticResource Gray8}"/>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <ContentPresenter Content="{TemplateBinding Content}"/>
                                <Path x:Name="SortIcon" Grid.Column="1" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z " Fill="{StaticResource GrayBrush3}" HorizontalAlignment="Left" Margin="4,0,0,0" Opacity="0" RenderTransformOrigin=".5,.5" Stretch="Uniform" VerticalAlignment="Center" Width="8">
                                    <Path.RenderTransform>
                                        <ScaleTransform ScaleY=".9" ScaleX=".9"/>
                                    </Path.RenderTransform>
                                </Path>
                            </Grid>
                            <Rectangle x:Name="VerticalSeparator" Grid.Column="1" Fill="{TemplateBinding SeparatorBrush}" Visibility="{TemplateBinding SeparatorVisibility}" VerticalAlignment="Stretch" Width="1" Opacity="0"/>
                            <Border x:Name="MouseOverLeftRightSeperator" Grid.ColumnSpan="2" BorderThickness="1,0" BorderBrush="{StaticResource SeperatorBrush}" Margin="-1,0,0,0" Opacity="0"/>
                            <Border x:Name="PressedLeftRightSeperator" Grid.ColumnSpan="2" Opacity="0" BorderBrush="{StaticResource SeperatorBrush}" BorderThickness="1,0" Margin="-1,0,0,0"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DataGridRowHeader Style-->
    <Style TargetType="dataPrimitives:DataGridRowHeader" x:Key="DefaultDataGridRowHeaderStyle">
        <Setter Property="Background" Value="{StaticResource TransparentLightLightBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="SeparatorBrush" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="SeparatorVisibility" Value="Collapsed"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="dataPrimitives:DataGridRowHeader">
                    <Grid x:Name="Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.695"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverCurrentRowSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.695"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalCurrentRow">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalEditingRow">
                                    <Storyboard>

                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="EditingRowGlyph"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="RowValid"/>
                                <VisualState x:Name="RowInvalid">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RowInvalidVisualElement"/>
                                        <ColorAnimation Duration="0" To="{StaticResource ValidationColor5}" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <ColorAnimation Duration="0" To="{StaticResource ValidationColor5}" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <ColorAnimation Duration="0" To="{StaticResource ValidationColor5}" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Storyboard.TargetName="EditingRowGlyph"/>
                                        <ColorAnimation Duration="0" To="{StaticResource ValidationColor5}" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="EditingRowGlyph"/>
                                        <ColorAnimation Duration="0" To="{StaticResource ValidationColor5}" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="EditingRowGlyph"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{StaticResource WhiteBrush}" BorderThickness="1,0,1,0" Grid.ColumnSpan="2" Grid.RowSpan="3">
                            <Grid>
                                <Rectangle x:Name="RowInvalidVisualElement" Grid.ColumnSpan="2" Fill="{StaticResource ValidationSummaryFillBrush2}" Opacity="0" Grid.RowSpan="3" Stretch="Fill"/>
                                <Rectangle x:Name="SelectedRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}" Grid.ColumnSpan="2" Grid.RowSpan="3" Grid.Column="0"/>
                                <Rectangle x:Name="MouseOverRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}" Grid.ColumnSpan="2" Grid.RowSpan="3" Grid.Column="0"/>
                            </Grid>
                        </Border>
                        <Rectangle x:Name="HorizontalSeparator" Grid.ColumnSpan="2" Fill="{TemplateBinding SeparatorBrush}" HorizontalAlignment="Stretch" Height="1" Margin="1,0,1,0" Grid.Row="2" Visibility="{TemplateBinding SeparatorVisibility}"/>
                        <ContentPresenter Content="{TemplateBinding Content}" Grid.Column="1" HorizontalAlignment="Center" Grid.RowSpan="2" VerticalAlignment="Center"/>
                        <Path x:Name="CurrentRowGlyph" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " HorizontalAlignment="Center" Height="10" Margin="8,0,8,0" Opacity="0" Grid.RowSpan="2" Stretch="Fill" VerticalAlignment="Center" Width="6">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="0,1.75" StartPoint="0,-0.150000005960464">
                                    <LinearGradientBrush.RelativeTransform>
                                        <MatrixTransform/>
                                    </LinearGradientBrush.RelativeTransform>
                                    <GradientStop Color="{StaticResource HighlightDarkColor}" Offset="0"/>
                                    <GradientStop Color="{StaticResource HighlightLightColor}" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Path x:Name="EditingRowGlyph" Fill="{StaticResource HighlightLightBrush}" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " HorizontalAlignment="Center" Height="10" Margin="8,0,8,0" Opacity="0" Grid.RowSpan="2" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DataGridRow Style-->
    <Style TargetType="data:DataGridRow" x:Key="DefaultDataGridRowStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="data:DataGridRow">
                    <dataPrimitives:DataGridFrozenGrid x:Name="Root">
                        <dataPrimitives:DataGridFrozenGrid.Resources>
                            <Storyboard x:Key="DetailsVisibleTransition">
                                <DoubleAnimation Duration="00:00:0.1" Storyboard.TargetProperty="ContentHeight" Storyboard.TargetName="DetailsPresenter"/>
                            </Storyboard>
                        </dataPrimitives:DataGridFrozenGrid.Resources>
                        <dataPrimitives:DataGridFrozenGrid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition/>
                        </dataPrimitives:DataGridFrozenGrid.ColumnDefinitions>
                        <dataPrimitives:DataGridFrozenGrid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </dataPrimitives:DataGridFrozenGrid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="NormalAlternatingRow">
                                    <Storyboard/>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.695"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.695"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="UnfocusedSelected">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="Invalid">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="SelectedRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
                        <Rectangle x:Name="MouseOverRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
                        <dataPrimitives:DataGridRowHeader x:Name="RowHeader" dataPrimitives:DataGridFrozenGrid.IsFrozen="True" Grid.RowSpan="3"/>
                        <dataPrimitives:DataGridCellsPresenter x:Name="CellsPresenter" Grid.Column="1" dataPrimitives:DataGridFrozenGrid.IsFrozen="True"/>
                        <dataPrimitives:DataGridDetailsPresenter x:Name="DetailsPresenter" Grid.Column="1" Grid.Row="1"/>
                        <Rectangle x:Name="BottomGridLine" Grid.Column="1" HorizontalAlignment="Stretch" Height="1" Grid.Row="2"/>
                    </dataPrimitives:DataGridFrozenGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DataGrid Style-->
    <Style TargetType="data:DataGrid" x:Key="DefaultDataGridStyle">
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="MinHeight" Value="200"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="Background" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ThumbBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="RowBackground" Value="Transparent"/>
        <Setter Property="AlternatingRowBackground" Value="Transparent"/>
        <Setter Property="HeadersVisibility" Value="Column"/>
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="SelectionMode" Value="Extended"/>
        <Setter Property="CanUserReorderColumns" Value="True"/>
        <Setter Property="CanUserResizeColumns" Value="True"/>
        <Setter Property="CanUserSortColumns" Value="True"/>
        <Setter Property="AutoGenerateColumns" Value="True"/>
        <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>
        <Setter Property="DragIndicatorStyle">
            <Setter.Value>
                <Style TargetType="ContentControl">
                    <Setter Property="Foreground" Value="{StaticResource TransparentLightLightBrush}"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ContentControl">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="SortStates">
                                            <VisualState x:Name="Unsorted"/>
                                            <VisualState x:Name="SortAscending">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="SortDescending">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SortIcon"/>
                                                    <DoubleAnimation Duration="0" To="-.9" Storyboard.TargetProperty="(RenderTransform).ScaleY" Storyboard.TargetName="SortIcon"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="{StaticResource TransparentDarkDarkDarkBrush}" Stretch="Fill"/>
                                    <Rectangle x:Name="BackgroundGradient" Grid.ColumnSpan="2"  Fill="{StaticResource ControlBackgroundBrush}" Opacity="0" Stretch="Fill"/>
                                    <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <ContentPresenter Content="{TemplateBinding Content}"/>
                                        <Path x:Name="SortIcon" Grid.Column="1" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z " Fill="{StaticResource GrayBrush10}" HorizontalAlignment="Left" Margin="4,0,0,0" Opacity="0" RenderTransformOrigin=".5,.5" Stretch="Uniform" VerticalAlignment="Center" Width="8">
                                            <Path.RenderTransform>
                                                <ScaleTransform ScaleY=".9" ScaleX=".9"/>
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="DropLocationIndicatorStyle">
            <Setter.Value>
                <Style TargetType="ContentControl">
                    <Setter Property="Background" Value="{StaticResource GrayBrush3}"/>
                    <Setter Property="Width" Value="2"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ContentControl">
                                <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="GridLinesVisibility" Value="None"/>
        <Setter Property="HorizontalGridLinesBrush" Value="{StaticResource GrayBrush2}"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="VerticalGridLinesBrush" Value="{StaticResource GrayBrush2}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="data:DataGrid">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid x:Name="Root" Background="{TemplateBinding Background}">
                                <Grid.Resources>
                                    <ControlTemplate x:Key="TopLeftHeaderTemplate" TargetType="dataPrimitives:DataGridColumnHeader">
                                        <Grid x:Name="Root">
                                            <Grid.RowDefinitions>
                                                <RowDefinition/>
                                                <RowDefinition/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Border BorderBrush="{StaticResource SeperatorBrush}" Background="{StaticResource WhiteBrush}" Grid.RowSpan="2"/>
                                            <Rectangle Fill="{StaticResource GrayBrush4}" Height="1" Grid.RowSpan="2" StrokeThickness="1" VerticalAlignment="Bottom" Width="Auto" Visibility="Collapsed"/>
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="TopRightHeaderTemplate" TargetType="dataPrimitives:DataGridColumnHeader">
                                        <Grid x:Name="RootElement">
                                            <Grid.RowDefinitions>
                                                <RowDefinition/>
                                                <RowDefinition/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Border Background="{StaticResource WhiteBrush}" Grid.RowSpan="2"/>
                                        </Grid>
                                    </ControlTemplate>
                                </Grid.Resources>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <dataPrimitives:DataGridColumnHeader x:Name="TopLeftCornerHeader" Template="{StaticResource TopLeftHeaderTemplate}" Width="22"/>
                                <dataPrimitives:DataGridColumnHeadersPresenter x:Name="ColumnHeadersPresenter" Grid.Column="1"/>
                                <dataPrimitives:DataGridColumnHeader x:Name="TopRightCornerHeader" Grid.Column="2" Template="{StaticResource TopRightHeaderTemplate}"/>
                                <Rectangle x:Name="ColumnHeadersAndRowsSeparator" Grid.ColumnSpan="3" Fill="{StaticResource GrayBrush2}" Height="1" StrokeThickness="1" VerticalAlignment="Bottom" Width="Auto" Visibility="Collapsed"/>
                                <dataPrimitives:DataGridRowsPresenter x:Name="RowsPresenter" Grid.ColumnSpan="2" Grid.Row="1"/>
                                <Rectangle x:Name="BottomRightCorner" Grid.Column="2" Fill="{TemplateBinding Background}" Grid.Row="2"/>
                                <Rectangle x:Name="BottomLeftCorner" Grid.ColumnSpan="2" Fill="{TemplateBinding Background}" Grid.Row="2"/>
                                <ScrollBar x:Name="VerticalScrollbar" Grid.Column="2" Margin="0,-1,-3,-1" Orientation="Vertical" Grid.Row="1" Width="18" />
                                <Grid Grid.Column="1" Grid.Row="2">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>
                                    <Rectangle x:Name="FrozenColumnScrollBarSpacer"/>
                                    <ScrollBar x:Name="HorizontalScrollbar" Grid.Column="1" Height="18" Margin="-1,0,-1,-3" Orientation="Horizontal" />
                                </Grid>
                                <dataInput:ValidationSummary x:Name="ValidationSummary" Grid.ColumnSpan="3" Filter="ObjectErrors" MaxHeight="90" Grid.Row="3"/>
                            </Grid>
                        </Border>
                        <Border x:Name="DisabledVisualElement" Background="{StaticResource TransparentLightLightBrush}" CornerRadius="2" HorizontalAlignment="Stretch" Height="Auto" IsHitTestVisible="False" Opacity="0" VerticalAlignment="Stretch" Width="Auto"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DataPagerPageButton Style-->
    <Style x:Key="ImageButton" TargetType="Button">
        <Setter Property="Background" Value="{StaticResource GrayBrush3}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Normal" GeneratedDuration="0:0:0.3" To="MouseOver"/>
                                    <VisualTransition From="MouseOver" GeneratedDuration="0:0:0.3" To="Normal"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.4"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.4"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.2"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ellipse">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.2"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard/>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Ellipse x:Name="ellipse" Stroke="{StaticResource CheckBoxMouseOverBrush}" Opacity="0.3" Fill="Transparent"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--CalendarItem Style-->
    <Style TargetType="System_Windows_Controls_Primitives:CalendarItem" x:Key="DefaultCalendarItemStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="System_Windows_Controls_Primitives:CalendarItem">
                    <Grid>
                        <Grid.Resources>
                            <SolidColorBrush x:Key="DisabledBrush" Color="{StaticResource TransparentLightLightColor}"/>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Margin="0">
                            <Grid Margin="2">
                                <Grid.Resources>
                                    <ControlTemplate x:Key="HeaderButtonTemplate" TargetType="Button">
                                        <Grid Cursor="Hand">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal"/>
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <ColorAnimation Duration="0" To="{StaticResource HighlightLightColor}" Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Content"/>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content"/>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{StaticResource GrayBrush3}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="1,5,1,9" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                        </Grid>
                                    </ControlTemplate>
                                    <DataTemplate x:Name="DayTitleTemplate">
                                        <TextBlock Foreground="{StaticResource TextBoxMouseOverBorderBrush}" FontWeight="Bold" FontSize="12" HorizontalAlignment="Center" Margin="0,4,0,4" Text="{Binding}" VerticalAlignment="Center"/>
                                    </DataTemplate>
                                    <ControlTemplate x:Key="PreviousButtonTemplate" TargetType="Button">
                                        <Grid Cursor="Hand">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal"/>
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <ColorAnimation Duration="0" To="{StaticResource HighlightLightColor}" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="IconPath"/>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Opacity)" Storyboard.TargetName="IconPath"/>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Rectangle Fill="{StaticResource TransparentWhiteBrush}" Opacity="1" Stretch="Fill"/>
                                            <Grid>
                                                <Path x:Name="IconPath" Data="M288.75,232.25 L288.75,240.625 L283,236.625 z" Fill="{StaticResource GrayBrush3}" HorizontalAlignment="Left" Height="10" Margin="14,-6,0,0" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
                                            </Grid>
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="NextButtonTemplate" TargetType="Button">
                                        <Grid Cursor="Hand">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal"/>
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <ColorAnimation Duration="0" To="{StaticResource HighlightLightColor}" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="IconPath"/>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled">
                                                        <Storyboard>
                                                            <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Opacity)" Storyboard.TargetName="IconPath"/>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Rectangle Fill="{StaticResource TransparentWhiteBrush}" Opacity="1" Stretch="Fill"/>
                                            <Grid>
                                                <Path x:Name="IconPath" Data="M282.875,231.875 L282.875,240.375 L288.625,236 z" Fill="{StaticResource GrayBrush3}" HorizontalAlignment="Right" Height="10" Margin="0,-6,14,0" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
                                            </Grid>
                                        </Grid>
                                    </ControlTemplate>
                                </Grid.Resources>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Button x:Name="PreviousButton" Cursor="Hand" HorizontalAlignment="Left" Height="24" Visibility="Collapsed" Width="24" Margin="13,0,0,0" Style="{StaticResource ImageButton}">
                                    <Grid>
                                        <Path x:Name="PreviousIconPath" Data="M288.75,232.25 L288.75,240.625 L283,236.625 z" Fill="{StaticResource CheckBoxMouseOverBrush}" HorizontalAlignment="Left" Height="10" Stretch="Fill" VerticalAlignment="Center" Width="6" Opacity="0.7"/>
                                    </Grid>
                                </Button>
                                <Button x:Name="HeaderButton" Foreground="{StaticResource HighlightBrush}" Grid.Column="1" FontWeight="Bold" FontSize="13.333" HorizontalAlignment="Center" Cursor="Hand" Height="30" VerticalAlignment="Center" FontFamily="Segoe UI" Width="120"/>
                                <Button x:Name="NextButton" Grid.Column="2" HorizontalAlignment="Right" Height="24" Visibility="Collapsed" Width="24" Cursor="Hand" Margin="0,0,13,0" Style="{StaticResource ImageButton}">
                                    <Path x:Name="NextIconPath" Data="M282.875,231.875 L282.875,240.375 L288.625,236 z" Fill="{StaticResource CheckBoxMouseOverBrush}" HorizontalAlignment="Right" Height="10" Stretch="Fill" VerticalAlignment="Center" Width="6" Opacity="0.7"/>
                                </Button>
                                <Grid x:Name="MonthView" Grid.ColumnSpan="3" Margin="15,7,15,6" Grid.Row="1" Visibility="Collapsed">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                </Grid>
                                <Grid x:Name="YearView" Grid.ColumnSpan="3" Margin="6,7,7,6" Grid.Row="1" Visibility="Collapsed">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                </Grid>
                            </Grid>
                        </Border>
                        <Rectangle x:Name="DisabledVisual" Fill="{StaticResource DisabledBrush}" Margin="0,2,0,2" Opacity="0" Stretch="Fill" Stroke="{StaticResource DisabledBrush}" StrokeThickness="1" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Calendar Style-->
    <Style TargetType="controls:Calendar" x:Key="DefaultCalendarStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="15"/>
        <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:Calendar">
                    <StackPanel x:Name="Root" HorizontalAlignment="Center">
                        <System_Windows_Controls_Primitives:CalendarItem x:Name="CalendarItem" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Margin="0" Padding="0"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--CalendarDayButton Style-->
    <Style TargetType="System_Windows_Controls_Primitives:CalendarDayButton" x:Key="DefaultCalendarDayButtonStyle">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinWidth" Value="8"/>
        <Setter Property="MinHeight" Value="8"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="System_Windows_Controls_Primitives:CalendarDayButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.695"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PressedBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>

                                        <DoubleAnimation Duration="0" To=".35" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CalendarButtonUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Active"/>
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" To="{StaticResource Gray3}" Storyboard.TargetProperty="(ContentControl.Foreground).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="Content"/>
                                        <ColorAnimation Duration="0" To="{StaticResource Gray3}" Storyboard.TargetProperty="(ContentControl.Foreground).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="Content"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="RegularDay"/>
                                <VisualState x:Name="Today">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="TodayBackground"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(ContentControl.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Offset)" Storyboard.TargetName="Content"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(ContentControl.Foreground).(GradientBrush.GradientStops)[2].(GradientStop.Offset)" Storyboard.TargetName="Content"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BlackoutDayStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="NormalDay"/>
                                <VisualState x:Name="BlackoutDay">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To=".2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BlackoutVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="TodayBackground" Opacity="0" >
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{StaticResource Gray2}"/>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle x:Name="SelectedRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}"/>
                        <Rectangle x:Name="MouseOverRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}"/>
                        <Border x:Name="PressedBorder" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0">
                            <Border.Background>
                                <SolidColorBrush Color="{StaticResource Gray5}"/>
                            </Border.Background>
                        </Border>
                        <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="5,1,5,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <ContentControl.Foreground>
                                <LinearGradientBrush>
                                    <GradientStop Color="{StaticResource WhiteColor}" Offset="0"/>
                                    <GradientStop Color="{StaticResource WhiteColor}" Offset="0"/>
                                    <GradientStop Color="{StaticResource Gray3}" Offset="0"/>
                                    <GradientStop Color="{StaticResource Gray3}" Offset="1"/>
                                </LinearGradientBrush>
                            </ContentControl.Foreground>
                        </ContentControl>
                        <Path x:Name="BlackoutVisual" Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z" Fill="{StaticResource BlackColorBrush}" HorizontalAlignment="Stretch" Margin="3" Opacity="0" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Stretch"/>
                        <Rectangle x:Name="FocusVisual" IsHitTestVisible="false" Stroke="{StaticResource TextBoxMouseOverBorderBrush}" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--CalendarButton Style-->
    <Style TargetType="System_Windows_Controls_Primitives:CalendarButton" x:Key="DefaultCalendarButtonStyle">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinWidth" Value="40"/>
        <Setter Property="MinHeight" Value="42"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="System_Windows_Controls_Primitives:CalendarButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.695"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PressedBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Active"/>
                                <VisualState x:Name="Inactive">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" To="{StaticResource Gray3}" Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Content"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CalendarButtonUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisual">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="SelectedRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}"/>
                        <Rectangle x:Name="MouseOverRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource ItemSelectedBrush}"/>
                        <Border x:Name="PressedBorder" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0">
                            <Border.Background>
                                <SolidColorBrush Color="{StaticResource Gray5}"/>
                            </Border.Background>
                        </Border>
                        <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{StaticResource GrayBrush3}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="1,0,1,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Rectangle x:Name="FocusVisual" IsHitTestVisible="false" Stroke="{StaticResource TextBoxMouseOverBorderBrush}" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DatePickerTextBox Style-->
    <Style TargetType="System_Windows_Controls_Primitives:DatePickerTextBox" x:Key="DefaultDatePickerTextBoxStyle">
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="System_Windows_Controls_Primitives:DatePickerTextBox">
                    <Grid x:Name="Root" Background="{TemplateBinding Background}">
                        <Grid.Resources>
                            <SolidColorBrush x:Key="WatermarkBrush" Color="{StaticResource Gray2}"/>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                    <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard/>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualElement">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="WatermarkStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unwatermarked"/>
                                <VisualState x:Name="Watermarked">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentElement"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Watermark"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusInnerRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="WatermarkContent" Background="{TemplateBinding Background}">
                            <Border x:Name="ContentElement" BorderBrush="{StaticResource WhiteColorBrush}" BorderThickness="1" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"/>
                            <Border x:Name="ContentElement2" BorderBrush="{StaticResource WhiteColorBrush}" BorderThickness="1">
                                <ContentControl x:Name="Watermark" Background="{TemplateBinding Background}" Content="{TemplateBinding Watermark}" Foreground="{StaticResource WatermarkBrush}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" IsTabStop="False" Opacity="0" Padding="2" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Border>
                        </Grid>
                        <Rectangle x:Name="Base" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" Opacity="1" />
                        <Rectangle x:Name="FocusRectangle" StrokeThickness="{TemplateBinding BorderThickness}" Opacity="0" Stroke="{StaticResource TextBoxMouseOverBorderBrush}" />
                        <Rectangle x:Name="FocusInnerRectangle" StrokeThickness="{TemplateBinding BorderThickness}" Opacity="0" Margin="1" Stroke="{StaticResource TextBoxMouseOverInnerBorderBrush}" />
                        <Rectangle x:Name="DisabledVisualElement" Stroke="{StaticResource GrayBrush12}" StrokeThickness="{TemplateBinding BorderThickness}" Fill="{StaticResource GrayBrush12}" IsHitTestVisible="False" Opacity="0"/>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
    </Style>

    <!--DatePicker Style-->
    <Style TargetType="controls:DatePicker" x:Key="DefaultDatePickerStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="SelectionBackground">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource HighlightDarkColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:DatePicker">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <SolidColorBrush x:Key="DisabledBrush" Color="{StaticResource TransparentLightLightColor}"/>
                            <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="Button">
                                <Grid FlowDirection="LeftToRight">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0"/>
                                                <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
                                                <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed"/>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverBorder">
                                                        <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PressedBorder">
                                                        <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisual">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="0.595"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid Background="{StaticResource TransparentWhiteBrush}" HorizontalAlignment="Center" Height="18" Margin="0" VerticalAlignment="Center" Width="19">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="20*"/>
                                            <ColumnDefinition Width="20*"/>
                                            <ColumnDefinition Width="20*"/>
                                            <ColumnDefinition Width="20*"/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="23*"/>
                                            <RowDefinition Height="19*"/>
                                            <RowDefinition Height="19*"/>
                                            <RowDefinition Height="19*"/>
                                        </Grid.RowDefinitions>
                                        <Border x:Name="Background" BorderBrush="{StaticResource TextBoxBorderBrush}" BorderThickness="1" Grid.ColumnSpan="4" Margin="0,-1,0,0" Opacity="1" Grid.Row="1" Grid.RowSpan="3">
                                            <Border.Background>

                                                <SolidColorBrush Color="{StaticResource Gray7}" />

                                            </Border.Background>
                                        </Border>
                                        <Rectangle Grid.ColumnSpan="4" Grid.RowSpan="1" StrokeThickness="1" Stroke="{StaticResource TextBoxBorderBrush}" Fill="{StaticResource TextBoxMouseOverBorderBrush}"/>
                                        <Border x:Name="MouseOverBorder" BorderBrush="{StaticResource TextBoxBorderBrush}" BorderThickness="1" Grid.ColumnSpan="4" Margin="0,-1,0,0" Opacity="0" Grid.Row="1" Grid.RowSpan="3">
                                            <Border.Background>

                                                <SolidColorBrush Color="{StaticResource Gray8}" />

                                            </Border.Background>
                                        </Border>
                                        <Border x:Name="PressedBorder" BorderBrush="{StaticResource TextBoxBorderBrush}" BorderThickness="1" Grid.ColumnSpan="4" Margin="0,-1,0,0" Opacity="0" Grid.Row="1" Grid.RowSpan="3">
                                            <Border.Background>

                                                <SolidColorBrush Color="{StaticResource Gray5}" />

                                            </Border.Background>
                                        </Border>
                                        <Path Grid.ColumnSpan="4" Grid.Column="0" Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z" Fill="{StaticResource GrayBrush3}" HorizontalAlignment="Center" Margin="4,3,4,3" Grid.Row="1" Grid.RowSpan="3" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center"/>
                                        <Ellipse Grid.ColumnSpan="4" Fill="{StaticResource WhiteColorBrush}" HorizontalAlignment="Center" Height="3" StrokeThickness="0" VerticalAlignment="Center" Width="3"/>
                                        <Border x:Name="DisabledVisual" BorderBrush="{StaticResource TransparentLightLightBrush}" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius="0,0,.5,.5" Opacity="0" Grid.Row="0" Grid.RowSpan="4" Background="White"/>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <System_Windows_Controls_Primitives:DatePickerTextBox x:Name="TextBox" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" Padding="{TemplateBinding Padding}" SelectionBackground="{TemplateBinding SelectionBackground}"/>
                        <Button x:Name="Button" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" Foreground="{TemplateBinding Foreground}" Margin="2,0,2,0" Template="{StaticResource DropDownButtonTemplate}" Width="20"/>
                        <Grid x:Name="DisabledVisual" Grid.ColumnSpan="2" IsHitTestVisible="False" Opacity="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle Fill="{StaticResource TransparentLightLightBrush}" RadiusY="1" RadiusX="1"/>
                            <Rectangle Grid.Column="1" Fill="{StaticResource TransparentLightLightBrush}" Height="18" Margin="2,0,2,0" RadiusY="1" RadiusX="1" Width="19"/>
                        </Grid>
                        <Popup x:Name="Popup"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!--AutoCompleteBox Style-->
    <!-- If you use AutoCompleteBoxStyle in a separate project-->
    <!--Be sure to include this ControlTemplate xaml for Validation Ux-->
    <!--AutoCompleteBoxStyle has a dependency on it-->
    <Style TargetType="input:AutoCompleteBox" x:Key="DefaultAutoCompleteBoxStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}"/>
        <Setter Property="Background" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="MinWidth" Value="45"/>
        <Setter Property="MinHeight" Value="26"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="input:AutoCompleteBox">
                    <Grid Opacity="{TemplateBinding Opacity}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="PopupStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1" To="PopupOpened"/>
                                    <VisualTransition GeneratedDuration="0:0:0.2" To="PopupClosed"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="PopupOpened">
                                    <Storyboard>
                                        <DoubleAnimation To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PopupBorder"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PopupClosed">
                                    <Storyboard>
                                        <DoubleAnimation To="0.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PopupBorder"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <TextBox x:Name="Text" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" IsTabStop="True" Margin="0" Padding="{TemplateBinding Padding}" Style="{StaticResource AutoCompleteTextBox}"/>
                        <Border x:Name="ValidationErrorElement" BorderBrush="{StaticResource ValidationBrush5}" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource CommonValidationToolTipTemplate}">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>true</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="{StaticResource ValidationBrush5}" Margin="1,3,0,0"/>
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="{StaticResource WhiteColorBrush}" Margin="1,3,0,0"/>
                            </Grid>
                        </Border>
                        <Popup x:Name="Popup">
                            <Grid Opacity="{TemplateBinding Opacity}">
                                <Border x:Name="PopupBorder" BorderThickness="0" Background="{StaticResource TransparentDarkBrush}" HorizontalAlignment="Stretch" Opacity="0" Effect="{StaticResource DropShadowBrush}">
                                    <Border.RenderTransform>
                                        <TranslateTransform X="1" Y="1"/>
                                    </Border.RenderTransform>
                                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" HorizontalAlignment="Stretch" Opacity="1.0" Padding="0">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="{StaticResource Gray1}" Offset="0"/>
                                                <GradientStop Color="{StaticResource Gray11}" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Border.Background>
                                        <Border.RenderTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="-1" Y="-1"/>
                                            </TransformGroup>
                                        </Border.RenderTransform>
                                        <ListBox x:Name="Selector" BorderThickness="0" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" ScrollViewer.HorizontalScrollBarVisibility="Auto" ItemTemplate="{TemplateBinding ItemTemplate}" ItemContainerStyle="{TemplateBinding ItemContainerStyle}" ScrollViewer.VerticalScrollBarVisibility="Auto"/>
                                    </Border>
                                </Border>
                            </Grid>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DataPager Style-->
    <Style TargetType="data:DataPager" x:Key="DefaultDataPagerStyle">
        <Setter Property="Background" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
        <Setter Property="NumericButtonStyle">
            <Setter.Value>
                <Style TargetType="ToggleButton">
                    <Setter Property="MinHeight" Value="20"/>
                    <Setter Property="MinWidth" Value="20"/>
                    <Setter Property="HorizontalAlignment" Value="Right"/>
                    <Setter Property="VerticalAlignment" Value="Center"/>
                    <Setter Property="Background" Value="{StaticResource TransparentWhiteBrush}"/>
                    <Setter Property="BorderThickness" Value="1"/>
                    <Setter Property="Padding" Value="1"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ToggleButton">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <ColorAnimation Duration="0" To="{StaticResource WhiteColor}" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
                                                    <ColorAnimation Duration="0" To="{StaticResource Gray1}" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="InnerBtnBorder"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ColorAnimation Duration="0" To="{StaticResource WhiteColor}" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
                                                    <ColorAnimation Duration="0" To="{StaticResource Gray1}" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="InnerBtnBorder"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="CheckStates">
                                            <VisualState x:Name="Checked">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedStateOuterBorder"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unchecked"/>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unfocused"/>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border x:Name="CheckedStateOuterBorder" BorderBrush="{StaticResource GrayBrush2}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource GrayBrush8}" CornerRadius="1" Opacity="0"/>
                                    <Border x:Name="OuterBtnBorder" BorderBrush="{StaticResource TransparentWhiteBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1">
                                        <Border x:Name="InnerBtnBorder" BorderBrush="{StaticResource TransparentWhiteBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Margin="0">
                                            <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2"/>
                                        </Border>
                                    </Border>
                                    <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource HighlightBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" Margin="1" Opacity="0"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="data:DataPager">
                    <Grid x:Name="Root" Background="Transparent">
                        <Grid.Resources>
                            <SolidColorBrush x:Key="BackgroundColor" Color="{StaticResource TransparentBlackColor}"/>
                            <SolidColorBrush x:Key="ForegroundColor" Color="{StaticResource BlackColor}"/>
                            <SolidColorBrush x:Key="BorderBrushColor" Color="{StaticResource WhiteColor}"/>
                            <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <ColorAnimation Duration="0" To="{StaticResource Gray4}" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="InnerBtnBorder"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ColorAnimation Duration="0" To="{StaticResource WhiteColor}" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
                                                    <ColorAnimation Duration="0" To="{StaticResource TransparentWhiteColor}" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="InnerBtnBorder"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="path"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Unfocused"/>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border x:Name="OuterBtnBorder" BorderBrush="{StaticResource TransparentWhiteBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1">
                                        <Border x:Name="InnerBtnBorder" BorderBrush="{StaticResource TransparentWhiteBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                            <ContentPresenter x:Name="path" Content="{TemplateBinding Content}"/>
                                        </Border>
                                    </Border>
                                    <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource HighlightBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" Margin="1" Opacity="0"/>
                                </Grid>
                            </ControlTemplate>
                            <Style x:Key="PagingTextBoxStyle" TargetType="TextBox">
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="Background" Value="{StaticResource WhiteColorBrush}"/>
                                <Setter Property="Foreground" Value="{StaticResource BlackColorBrush}"/>
                                <Setter Property="Padding" Value="2, 2, 2, -1"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="TextBox">
                                            <Grid x:Name="RootElement">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard/>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="ReadOnly">
                                                            <Storyboard>
                                                                <DoubleAnimation To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusRectangle">
                                                                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusInnerRectangle">
                                                                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Unfocused"/>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle x:Name="Base" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" Fill="{TemplateBinding Background}" Opacity="1" />
                                                <Rectangle x:Name="FocusRectangle" StrokeThickness="{TemplateBinding BorderThickness}" Opacity="0" Stroke="{StaticResource TextBoxMouseOverBorderBrush}" />
                                                <Rectangle x:Name="FocusInnerRectangle" StrokeThickness="{TemplateBinding BorderThickness}" Opacity="0" Margin="1" Stroke="{StaticResource TextBoxMouseOverInnerBorderBrush}" />
                                                <Grid>
                                                    <Border x:Name="ReadOnlyVisualElement" Background="{StaticResource TransparentLightLightBrush}" Opacity="0"/>
                                                    <Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
                                                        <ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Margin="0,0,0,2" Padding="{TemplateBinding Padding}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                    </Border>
                                                </Grid>

                                                <Border x:Name="DisabledVisualElement" BorderBrush="{StaticResource GrayBrush12}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource GrayBrush12}" IsHitTestVisible="False" Opacity="0"/>
                                                <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource HighlightBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" Margin="1" Opacity="0"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentPagePrefixTextBlock"/>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentPageSuffixTextBlock"/>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.58"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MoveStates">
                                <VisualState x:Name="MoveEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="CurrentPageTextBox">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MoveDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="CurrentPageTextBox">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MoveFirstStates">
                                <VisualState x:Name="MoveFirstEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="FirstPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MoveFirstDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="FirstPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MovePreviousStates">
                                <VisualState x:Name="MovePreviousEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="PreviousPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MovePreviousDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="PreviousPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MoveNextStates">
                                <VisualState x:Name="MoveNextEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="NextPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MoveNextDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="NextPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MoveLastStates">
                                <VisualState x:Name="MoveLastEnabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="LastPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MoveLastDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="LastPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DisplayModeStates">
                                <VisualState x:Name="FirstLastNumeric">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NextPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PreviousPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CurrentPageTextBox">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PageDisplay">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="FirstLastPreviousNext">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NumericButtonPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="FirstLastPreviousNextNumeric">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CurrentPageTextBox">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PageDisplay">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Numeric">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FirstPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LastPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NextPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PreviousPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CurrentPageTextBox">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PageDisplay">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Separator1">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Separator2">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PreviousNext">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FirstPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LastPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="NumericButtonPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PreviousNextNumeric">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FirstPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LastPageButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CurrentPageTextBox">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PageDisplay">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" MinHeight="24" Padding="{TemplateBinding Padding}" VerticalAlignment="Bottom">
                            <StackPanel HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Orientation="Horizontal" VerticalAlignment="Stretch" Margin="5">
                                <Button x:Name="FirstPageButton" BorderBrush="{StaticResource TextBoxBorderBrush}" BorderThickness="1" Foreground="{StaticResource ForegroundColor}" HorizontalAlignment="Right" Height="25" Padding="1" VerticalAlignment="Center" Width="25" Margin="0,0,2,0" Style="{StaticResource ImageButton}">
                                    <Grid Height="9" Width="8" Opacity="0.7">
                                        <Path Data="M0,1 L1,0 L1,2 Z" Fill="{StaticResource CheckBoxMouseOverBrush}" HorizontalAlignment="Right" Height="9" Stretch="Fill" Width="5"/>
                                        <Rectangle Fill="{StaticResource CheckBoxMouseOverBrush}" HorizontalAlignment="Left" Width="2"/>
                                    </Grid>
                                </Button>
                                <Button Style="{StaticResource ImageButton}" x:Name="PreviousPageButton" BorderBrush="{StaticResource TextBoxBorderBrush}" BorderThickness="1" Background="{StaticResource NormalBrush}" Foreground="{StaticResource ForegroundColor}" HorizontalAlignment="Right" Height="25" Padding="1" VerticalAlignment="Center" Width="25" Margin="0,0,2,0">
                                    <Path Data="M0,1 L1,0 L1,2 Z" Fill="{StaticResource CheckBoxMouseOverBrush}" HorizontalAlignment="Center" Height="9" Stretch="Fill" Width="5" Opacity="0.7"/>
                                </Button>
                                <Border x:Name="Separator1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,0,1,0" Background="{StaticResource GrayBrush4}" Margin="0,3,0,3" Width="1" Visibility="Collapsed"/>
                                <StackPanel x:Name="NumericButtonPanel" Margin="1" Orientation="Horizontal"/>
                                <StackPanel x:Name="PageDisplay" Orientation="Horizontal">
                                    <TextBlock x:Name="CurrentPagePrefixTextBlock" Foreground="{TemplateBinding Foreground}" Margin="4,0,0,0" VerticalAlignment="Center" Width="Auto" Text="PAGE"/>
                                    <TextBox x:Name="CurrentPageTextBox" Foreground="{StaticResource HighlightBrush}" Height="Auto" Margin="4,0" Style="{StaticResource PagingTextBoxStyle}" TextWrapping="Wrap" Width="40" FontSize="16" HorizontalAlignment="Center" BorderBrush="{StaticResource TextBoxBorderBrush}" FontWeight="Bold"/>
                                    <TextBlock x:Name="CurrentPageSuffixTextBlock" Foreground="{TemplateBinding Foreground}" Margin="0,0,4,0" VerticalAlignment="Center" Width="Auto"/>
                                </StackPanel>
                                <Border x:Name="Separator2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,0,1,0" Background="{StaticResource GrayBrush4}" Margin="0,3,0,3" Width="1" Visibility="Collapsed"/>
                                <Button Style="{StaticResource ImageButton}" x:Name="NextPageButton" BorderBrush="{StaticResource TextBoxBorderBrush}" BorderThickness="1" Background="{StaticResource NormalBrush}" Foreground="{StaticResource ForegroundColor}" HorizontalAlignment="Right" Height="25" Padding="1" VerticalAlignment="Center" Width="25" Margin="2,0,0,0">
                                    <Path Data="M0,0 L1,1 L0,2 Z" Fill="{StaticResource CheckBoxMouseOverBrush}" HorizontalAlignment="Center" Height="9" Stretch="Fill" Width="5" Opacity="0.7"/>
                                </Button>
                                <Button Style="{StaticResource ImageButton}" x:Name="LastPageButton" BorderBrush="{StaticResource TextBoxBorderBrush}" BorderThickness="1" Background="{StaticResource NormalBrush}" Foreground="{StaticResource ForegroundColor}" HorizontalAlignment="Right" Height="25" Padding="1" VerticalAlignment="Center" Width="25" Margin="2,0,0,0">
                                    <Grid Height="9" Width="8" Opacity="0.7">
                                        <Path Data="M0,0 L1,1 L0,2 Z" Fill="{StaticResource CheckBoxMouseOverBrush}" HorizontalAlignment="Left" Height="9" Stretch="Fill" Width="5"/>
                                        <Rectangle Fill="{StaticResource CheckBoxMouseOverBrush}" HorizontalAlignment="Right" Width="2"/>
                                    </Grid>
                                </Button>
                            </StackPanel>
                        </Border>
                        <Border x:Name="DisabledBorder" BorderThickness="1" Background="{StaticResource WhiteBrush}" Opacity="0" IsHitTestVisible="False"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
    </Style>

    <!--Label Style-->
    <Style TargetType="dataInput:Label" x:Key="DefaultLabelStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="dataInput:Label">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="ControlColor" Storyboard.TargetProperty="Color">
                                            <EasingColorKeyFrame KeyTime="0" Value="{StaticResource Gray7}"/>
                                        </ColorAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="Invalid">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:1.5" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentControl">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Red"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="RequiredStates">
                                <VisualState x:Name="NotRequired"/>
                                <VisualState x:Name="Required">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="FontWeight" Storyboard.TargetName="ContentControl">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="SemiBold"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" Padding="{TemplateBinding Padding}">
                            <ContentControl x:Name="ContentControl" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" FontWeight="{TemplateBinding FontWeight}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" VerticalAlignment="{TemplateBinding VerticalAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                                <ContentControl.Foreground>
                                    <SolidColorBrush x:Name="ControlColor" Color="{StaticResource BlackColor}" />
                                </ContentControl.Foreground>
                            </ContentControl>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!--GridSplitter Style-->
    <Style TargetType="controls:GridSplitter" x:Key="DefaultGridSplitterStyle">
        <Setter Property="Background" Value="{StaticResource WhiteColorBrush}"/>
        <Setter Property="IsTabStop" Value="true"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="PreviewStyle">
            <Setter.Value>
                <Style TargetType="Control">
                    <Setter Property="Background" Value="{StaticResource GrayBrush2}"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Control">
                                <Grid x:Name="Root" Opacity=".5">
                                    <Rectangle Fill="{TemplateBinding Background}"/>
                                    <Grid x:Name="HorizontalTemplate" Height="6"/>
                                    <Grid x:Name="VerticalTemplate" Visibility="Collapsed" Width="6"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:GridSplitter">
                    <Grid x:Name="Root" IsHitTestVisible="{TemplateBinding IsEnabled}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle Fill="{TemplateBinding Background}" StrokeThickness="0"/>
                        <Grid x:Name="HorizontalTemplate" Height="10">
                            <Border BorderThickness="1" BorderBrush="{StaticResource TextBoxBorderBrush}" >
                                <Canvas Height="6" VerticalAlignment="Center" Width="12">
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="1" Canvas.Top="0.29">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="1.525">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="1" Canvas.Top="3.463">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="4.698">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="4.006" Canvas.Top="0.29">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="1.525" Canvas.Left="3.006">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="4.006" Canvas.Top="3.463">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="4.698" Canvas.Left="3.006">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="6.845" Canvas.Top="0.29">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="1.525" Canvas.Left="5.845">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="6.845" Canvas.Top="3.463">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="4.698" Canvas.Left="5.845">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="9.851" Canvas.Top="0.29">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="1.525" Canvas.Left="8.851">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="9.851" Canvas.Top="3.463">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="4.698" Canvas.Left="8.851">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                </Canvas>
                            </Border>
                        </Grid>
                        <Grid x:Name="VerticalTemplate" Visibility="Collapsed" Width="10">
                            <Border BorderThickness="1" BorderBrush="{StaticResource TextBoxBorderBrush}" >
                                <Canvas Width="6" Height="12" >
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="1" Canvas.Top="0.29">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="1.525">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="1" Canvas.Top="3.463">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="4.698">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="1" Canvas.Top="6.302">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="7.537">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="1" Canvas.Top="8.974">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="10.209">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="4.006" Canvas.Top="0.29">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="1.525" Canvas.Left="3.006">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="4.006" Canvas.Top="3.463">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="4.698" Canvas.Left="3.006">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="4.006" Canvas.Top="6.302">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="7.537" Canvas.Left="3.006">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M405.14063,248.65625 L405.14063,250.01588" Fill="White" Height="2.36" Stretch="Fill" UseLayoutRounding="False" Width="1" StrokeThickness="0.25" Canvas.Left="4.006" Canvas.Top="8.974">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                    <Path Data="M404.76563,249.82813 L406.984,249.82813" Fill="White" Height="0.25" Stretch="Fill" StrokeThickness="0.25" UseLayoutRounding="False" Width="2.468" Canvas.Top="10.209" Canvas.Left="3.006">
                                        <Path.Stroke>
                                            <SolidColorBrush Color="{StaticResource Gray2}"/>
                                        </Path.Stroke>
                                    </Path>
                                </Canvas>
                            </Border>
                        </Grid>
                        <Rectangle x:Name="FocusVisual" IsHitTestVisible="false" Opacity="0" StrokeThickness="1">
                            <Rectangle.Stroke>
                                <SolidColorBrush Color="{StaticResource HighlightDarkColor}"/>
                            </Rectangle.Stroke>
                        </Rectangle>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!--TabControl Style-->
    <Style TargetType="controls:TabControl" x:Key="DefaultTabControlStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource Gray1}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:TabControl">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualTop">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualBottom">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualLeft">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualRight">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="TemplateTop" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <System_Windows_Controls_Primitives:TabPanel x:Name="TabPanelTop" Margin="5,2,2,-1" Canvas.ZIndex="100"/>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" MinWidth="10" MinHeight="10" Grid.Row="1" BorderThickness="0,1,0,0">
                                <ContentPresenter x:Name="ContentTop" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>
                            <Border x:Name="DisabledVisualTop" Background="{StaticResource TransparentLightLightBrush}" CornerRadius="0,0,3,3" IsHitTestVisible="False" Opacity="0" Grid.Row="1" Grid.RowSpan="2" Canvas.ZIndex="1"/>
                        </Grid>
                        <Grid x:Name="TemplateBottom" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <System_Windows_Controls_Primitives:TabPanel x:Name="TabPanelBottom" Margin="2,-1,2,2" Grid.Row="1" Canvas.ZIndex="1"/>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3,3,0,0" MinWidth="10" MinHeight="10">
                                <ContentPresenter x:Name="ContentBottom" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>
                            <Border x:Name="DisabledVisualBottom" Background="{StaticResource TransparentLightLightBrush}" CornerRadius="3,3,0,0" IsHitTestVisible="False" Opacity="0" Canvas.ZIndex="1"/>
                        </Grid>
                        <Grid x:Name="TemplateLeft" Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <System_Windows_Controls_Primitives:TabPanel x:Name="TabPanelLeft" Margin="2,2,-1,2" Canvas.ZIndex="1"/>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" CornerRadius="0,3,3,0" MinWidth="10" MinHeight="10">
                                <ContentPresenter x:Name="ContentLeft" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>
                            <Border x:Name="DisabledVisualLeft" Background="{StaticResource TransparentLightLightBrush}" Grid.Column="1" CornerRadius="0,3,3,0" IsHitTestVisible="False" Opacity="0" Canvas.ZIndex="1"/>
                        </Grid>
                        <Grid x:Name="TemplateRight" Visibility="Collapsed">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <System_Windows_Controls_Primitives:TabPanel x:Name="TabPanelRight" Grid.Column="1" Margin="-1,2,2,2" Canvas.ZIndex="1"/>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3,0,0,3" MinWidth="10" MinHeight="10">
                                <ContentPresenter x:Name="ContentRight" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>
                            <Border x:Name="DisabledVisualRight" Background="{StaticResource TransparentLightLightBrush}" CornerRadius="3,0,0,3" IsHitTestVisible="False" Margin="0" Opacity="0" Canvas.ZIndex="1"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--TabItem Style-->
    <Style TargetType="controls:TabItem" x:Key="DefaultTabItemStyle">
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ControlTitleFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource TransparentWhiteBrush}"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource Gray1}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="6,2,6,2"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="MinWidth" Value="5"/>
        <Setter Property="MinHeight" Value="5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:TabItem">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                    <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="TopBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BottomBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LeftBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="RightBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.6"/>
                                        </DoubleAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HeaderTopUnselected">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HeaderTopSelected">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HeaderBottomUnselected">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HeaderBottomSelected">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HeaderLeftUnselected">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HeaderLeftSelected">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HeaderRightUnselected">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HeaderRightSelected">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard/>
                                </VisualState>
                                <VisualState x:Name="Unfocused">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="TemplateTopSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                            <Border BorderThickness="1,0,1,0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource WhiteBrush}">
                                <ContentControl x:Name="HeaderTopSelected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}" FontWeight="Bold"/>
                            </Border>
                        </Grid>
                        <Grid x:Name="TemplateTopUnselected" Visibility="Collapsed">
                            <Border x:Name="TopBorder" BorderThickness="1,0,1,0">
                                <ContentControl x:Name="HeaderTopUnselected" Cursor="{TemplateBinding Cursor}" Foreground="{StaticResource CheckBoxBrush}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>
                        </Grid>
                        <Grid x:Name="TemplateBottomSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                            <Border BorderThickness="1,0,1,0" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource WhiteBrush}">
                                <ContentControl x:Name="HeaderBottomSelected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}" FontWeight="Bold"/>
                            </Border>


                        </Grid>
                        <Grid x:Name="TemplateBottomUnselected" Visibility="Collapsed">
                            <Border x:Name="BottomBorder" BorderThickness="1,0,1,0">
                                <ContentControl x:Name="HeaderBottomUnselected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>

                        </Grid>
                        <Grid x:Name="TemplateLeftSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                            <Border BorderThickness="0,1,0,1" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource WhiteBrush}">
                                <ContentControl x:Name="HeaderLeftSelected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}" FontWeight="Bold"/>
                            </Border>
                        </Grid>
                        <Grid x:Name="TemplateLeftUnselected" Visibility="Collapsed">
                            <Border x:Name="LeftBorder" BorderThickness="0,1,0,1">
                                <ContentControl x:Name="HeaderLeftUnselected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>
                        </Grid>
                        <Grid x:Name="TemplateRightSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                            <Border BorderThickness="0,1,0,1" BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource WhiteBrush}">
                                <ContentControl x:Name="HeaderRightSelected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}" FontWeight="Bold"/>
                            </Border>

                        </Grid>
                        <Grid x:Name="TemplateRightUnselected" Visibility="Collapsed">
                            <Border x:Name="RightBorder" BorderThickness="0,1,0,1">
                                <ContentControl x:Name="HeaderRightUnselected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>
                        </Grid>
                        <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource HighlightBrush}" BorderThickness="1" CornerRadius="3,3,0,0" IsHitTestVisible="false" Margin="-1" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!--ChildWindow Style-->
    <Style x:Key="ChildWindowStyle" TargetType="controls:ChildWindow">
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="TabNavigation" Value="Cycle"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Value="{StaticResource ThumbBrush}" Property="BorderBrush"/>
        <Setter Property="OverlayBrush" Value="{StaticResource PageOverlayBrush}"/>
        <Setter Property="OverlayOpacity" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:ChildWindow">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <Style x:Key="ButtonStyle" TargetType="Button">
                                <Setter Property="Background" Value="{StaticResource TransparentWhiteBrush}"/>
                                <Setter Property="Foreground" Value="{StaticResource BlackColorBrush}"/>
                                <Setter Property="Padding" Value="3"/>
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="BorderBrush" Value="{StaticResource GrayBrush2}"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid x:Name="grid" Background="{StaticResource TransparentWhiteBrush}" HorizontalAlignment="Center" Height="14" VerticalAlignment="Center" Width="15">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <DoubleAnimation Duration="0" To="0.95" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" To="0.85" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Path x:Name="X_Fuzz2" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="{StaticResource FuzzBrush2}" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="{StaticResource FuzzBrush2}" Visibility="Collapsed" VerticalAlignment="Center" Width="9">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleY="1.3" ScaleX="1.3"/>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path x:Name="X_Fuzz1" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="{StaticResource FuzzBrush1}" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="{StaticResource FuzzBrush1}" Visibility="Collapsed" VerticalAlignment="Center" Width="9">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleY="1.1" ScaleX="1.1"/>
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path x:Name="X_Fuzz0" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="{StaticResource FuzzBrush3}" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" Stretch="Fill" Stroke="{StaticResource FuzzBrush3}" Visibility="Collapsed" VerticalAlignment="Center" Width="9"/>
                                                <Path x:Name="X" Stroke="{StaticResource GrayBrush3}" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="{StaticResource WhiteColorBrush}" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="0.7" Stretch="Fill" VerticalAlignment="Center" Width="9"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="WindowStates">
                                <VisualState x:Name="Open">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Overlay">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="1">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <PowerEase EasingMode="EaseInOut"/>
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.55" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
                                            <SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
                                            <SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Closed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Overlay">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="Overlay" Background="{TemplateBinding OverlayBrush}" HorizontalAlignment="Stretch" Margin="0" Opacity="{TemplateBinding OverlayOpacity}" VerticalAlignment="Top"/>
                        <Grid x:Name="ContentRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Height="{TemplateBinding Height}" RenderTransformOrigin="0.5,0.5" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{StaticResource WhiteColorBrush}" Effect="{StaticResource DropShadowBrush}">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <Border x:Name="Chrome" BorderThickness="0,0,0,1" Width="Auto" Background="Transparent">
                                        <Grid Height="Auto" Width="Auto">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition/>
                                                <ColumnDefinition Width="30"/>
                                            </Grid.ColumnDefinitions>
                                            <ContentControl Content="{TemplateBinding Title}" HorizontalAlignment="Stretch" IsTabStop="False" Margin="20,21,8,0" VerticalAlignment="Center" FontSize="18.667"/>
                                            <Button x:Name="CloseButton" Grid.Column="1" HorizontalAlignment="Center" Height="14" IsTabStop="False" Style="{StaticResource ButtonStyle}" VerticalAlignment="Top" Width="15" Margin="0,5,0,0"/>
                                            <Rectangle Fill="{StaticResource BrandingBrush}" Height="6" Margin="20,15,0,0" VerticalAlignment="Top" Width="80" HorizontalAlignment="Left"/>
                                        </Grid>
                                    </Border>
                                    <Border Background="{TemplateBinding Background}" Margin="7" Grid.Row="1">
                                        <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                    </Border>
                                </Grid>
                            </Border>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--AutoCompleteBoxTextBox Style-->
    <Style x:Key="AutoCompleteTextBox" TargetType="TextBox">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="{StaticResource WhiteColorBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard/>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusedBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" Opacity="1">
                            <Grid>
                                <Border x:Name="ReadOnlyVisualElement" Background="{StaticResource GrayBrush13}" Opacity="0"/>
                                <Grid>
                                    <ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}"/>
                                </Grid>
                            </Grid>
                        </Border>
                        <Border x:Name="FocusedBorder" BorderBrush="{StaticResource CheckBoxBrush}" BorderThickness="1" CornerRadius="2" Opacity="0" />
                        <Border x:Name="DisabledVisualElement" BorderBrush="{StaticResource GrayBrush12}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource GrayBrush12}" IsHitTestVisible="False" Opacity="0"/>
                        <Border x:Name="ValidationErrorElement" BorderBrush="{StaticResource ValidationBrush5}" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>true</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="{StaticResource ValidationBrush5}" Margin="1,3,0,0"/>
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="{StaticResource WhiteColorBrush}" Margin="1,3,0,0"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--CommonValidationToolTipTemplate Style-->
    <!-- If you use AutoCompleteBoxStyle in a separate project-->
    <!--Be sure to include this ControlTemplate xaml for Validation Ux-->
    <!--AutoCompleteBoxStyle has a dependency on it-->
    <ControlTemplate x:Key="CommonValidationToolTipTemplate" TargetType="ToolTip">
        <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="Translation" X="-25"/>
            </Grid.RenderTransform>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="Translation">
                                    <DoubleAnimation.EasingFunction>
                                        <BackEase Amplitude=".3" EasingMode="EaseOut"/>
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                                <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="Translation"/>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Background="{StaticResource ValidationBrush1}" CornerRadius="5" Margin="4,4,-4,-4"/>
            <Border Background="{StaticResource ValidationBrush2}" CornerRadius="4" Margin="3,3,-3,-3"/>
            <Border Background="{StaticResource ValidationBrush3}" CornerRadius="3" Margin="2,2,-2,-2"/>
            <Border Background="{StaticResource ValidationBrush4}" CornerRadius="2" Margin="1,1,-1,-1"/>
            <Border Background="{StaticResource ValidationBrush5}" CornerRadius="2">
                <TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" UseLayoutRounding="false"/>
            </Border>
        </Grid>
    </ControlTemplate>

    <!--TreeView Style-->
    <Style TargetType="controls:TreeView" x:Key="DefaultTreeViewStyle">
        <Setter Property="Background" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource ThumbBrush}"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="TabNavigation" Value="Once"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:TreeView">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="ValidationToolTip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
                                <ScrollViewer x:Name="ScrollViewer" BorderBrush="Transparent" BorderThickness="0" Background="{x:Null}" HorizontalScrollBarVisibility="Auto" IsTabStop="False" TabNavigation="Once" VerticalScrollBarVisibility="Auto">
                                    <ItemsPresenter Margin="5"/>
                                </ScrollViewer>
                            </Border>
                        </Border>
                        <Border x:Name="Validation" BorderBrush="{StaticResource ValidationBrush5}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" CornerRadius="2" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="ValidationToolTip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" IsHitTestVisible="True" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource CommonValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="10" Margin="0,-4,-4,0" VerticalAlignment="Top" Width="10">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 Z" Fill="{StaticResource ValidationBrush5}" Margin="-1,3,0,0"/>
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="{StaticResource WhiteColorBrush}" Margin="-1,3,0,0"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--TreeViewItem Style-->
    <Style TargetType="controls:TreeViewItem" x:Key="DefaultTreeViewItemStyle">
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="TabNavigation" Value="Once"/>
        <Setter Property="Margin" Value="0 1 0 0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:TreeViewItem">
                    <Grid Background="{x:Null}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="15"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="SelectWrapper" Storyboard.TargetProperty="Color">
                                            <EasingColorKeyFrame KeyTime="0" Value="{StaticResource WhiteColor}"/>
                                        </ColorAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedInactive">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HasItemsStates">
                                <VisualState x:Name="HasItems"/>
                                <VisualState x:Name="NoItems">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpansionStates">
                                <VisualState x:Name="Collapsed"/>
                                <VisualState x:Name="Expanded">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ItemsHost">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="ValidationToolTip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ToggleButton x:Name="ExpanderButton" HorizontalAlignment="Stretch" IsTabStop="False" TabNavigation="Once" VerticalAlignment="Stretch">
                            <ToggleButton.Template>
                                <ControlTemplate TargetType="ToggleButton">
                                    <Grid x:Name="Root" Background="Transparent">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal"/>
                                                <VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="UncheckedVisual">
                                                            <EasingColorKeyFrame KeyTime="0" Value="White"/>
                                                            <EasingColorKeyFrame KeyTime="0:0:0.4" Value="{StaticResource AccentColor}"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To=".7" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                            <VisualStateGroup x:Name="CheckStates">
                                                <VisualState x:Name="Unchecked"/>
                                                <VisualState x:Name="Checked">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="UncheckedVisual" d:IsOptimized="True"/>
                                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CheckedVisual" d:IsOptimized="True"/>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Grid x:Name="grid" HorizontalAlignment="Right" Margin="2 2 5 2" Opacity="0.6">
                                            <Path x:Name="OldUncheckedVisual" Data="M5.8535156,2.1822653 L10.195313,2.1822653 L10.195313,6.5152731 L14.537109,6.5152731 L14.537109,10.848281 L10.195313,10.848281 L10.195313,15.181289 L5.8535156,15.181289 L5.8535156,10.848281 L1.5205078,10.848281 L1.5205078,6.5152731 L5.8535156,6.5152731 z" HorizontalAlignment="Right" Height="8" Margin="0" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Center" Width="8" Visibility="Collapsed" >
                                                <Path.Fill>
                                                    <SolidColorBrush Color="{StaticResource Gray3}"/>
                                                </Path.Fill>
                                            </Path>
                                            <Path x:Name="OldCheckedVisual" Data="M10.195313,6.5152731 L14.537109,6.5152731 14.537109,10.848281 10.195313,10.848281 5.8535156,10.848281 1.5205078,10.848281 1.5205078,6.5152731 5.8535156,6.5152731 z" HorizontalAlignment="Right" Height="2" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Center" Width="8" Visibility="Collapsed" >
                                                <Path.Fill>
                                                    <SolidColorBrush Color="{StaticResource Gray3}"/>
                                                </Path.Fill>
                                            </Path>
                                            <Path x:Name="UncheckedVisual" Data="M 0,0 L 0,9 L 5,4.5 Z" HorizontalAlignment="Right" Height="9" StrokeThickness="1" StrokeLineJoin="Miter" VerticalAlignment="Center" Width="6" Margin="0,0,2,0" UseLayoutRounding="False">
                                                <Path.Fill>
                                                    <SolidColorBrush x:Name="BlankBackgroundBrush" Color="{StaticResource BaseColor2}" />
                                                </Path.Fill>
                                                <Path.Stroke>
                                                    <SolidColorBrush x:Name="BaseBrush5" Color="{StaticResource BaseColor5}" />
                                                </Path.Stroke>
                                            </Path>
                                            <Path x:Name="CheckedVisual" Data="M 6,0 L 6,6 L 0,6 Z" HorizontalAlignment="Center" Height="6" Opacity="0" StrokeLineJoin="Miter" VerticalAlignment="Center" Width="6" Stroke="Black" UseLayoutRounding="False">
                                                <Path.Fill>
                                                    <SolidColorBrush Color="{StaticResource BaseColor3}"/>
                                                </Path.Fill>
                                            </Path>
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </ToggleButton.Template>
                        </ToggleButton>
                        <Rectangle x:Name="SelectedRectangle" Grid.Column="1" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource HighlightBrush}"/>
                        <Rectangle x:Name="Selection" Grid.Column="1" IsHitTestVisible="False" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1">
                            <Rectangle.Fill>
                                <SolidColorBrush x:Name="SelectionFill" Color="{StaticResource HighlightLightColor}"/>
                            </Rectangle.Fill>
                            <Rectangle.Stroke>
                                <SolidColorBrush x:Name="SelectionStroke" Color="{StaticResource HighlightDarkColor}"/>
                            </Rectangle.Stroke>
                        </Rectangle>
                        <Button x:Name="Header" FontWeight="Light" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Cursor="{TemplateBinding Cursor}" ClickMode="Hover" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" TabNavigation="Once" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" >
                            <Button.Foreground>
                                <SolidColorBrush x:Name="HeaderWrapper" Color="{StaticResource BlackColor}" />
                            </Button.Foreground>
                            <Button.Template>
                                <ControlTemplate TargetType="Button">
                                    <Grid Background="{TemplateBinding Background}">
                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal"/>
                                                <VisualState x:Name="Pressed">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle">
                                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenterWrapperColor" Storyboard.TargetProperty="Color">
                                                            <EasingColorKeyFrame KeyTime="0" Value="{StaticResource WhiteColor}"/>
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content"/>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Rectangle x:Name="MouseOverRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource HighlightBrush}"/>
                                        <ContentControl Margin="0,-2" >
                                            <ContentControl.Foreground>
                                                <SolidColorBrush x:Name="ContentPresenterWrapperColor" Color="{StaticResource BlackColor}" />
                                            </ContentControl.Foreground>
                                            <ContentPresenter x:Name="Content" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}"/>
                                        </ContentControl>
                                    </Grid>
                                </ControlTemplate>
                            </Button.Template>
                            <ContentControl >
                                <ContentControl.Foreground>
                                    <SolidColorBrush x:Name="SelectWrapper" Color="{StaticResource BlackColor}" />
                                </ContentControl.Foreground>
                                <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}"/>
                            </ContentControl>
                        </Button>
                        <Border x:Name="Validation" BorderBrush="{StaticResource ValidationBrush5}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" CornerRadius="2" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="ValidationToolTip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" IsHitTestVisible="True" Placement="Right" PlacementTarget="{Binding ElementName=Header}" Template="{StaticResource CommonValidationToolTipTemplate}"/>
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent" HorizontalAlignment="Right" Height="10" Margin="0,-4,-4,0" VerticalAlignment="Top" Width="10">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 Z" Fill="{StaticResource ValidationBrush5}" Margin="-1,3,0,0"/>
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="{StaticResource WhiteColorBrush}" Margin="-1,3,0,0"/>
                            </Grid>
                        </Border>
                        <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Implicit Styles -->
    <!-- When defining your own styles, set "based on" the same way to keep control theming -->
    <Style TargetType="data:DataGridCell" BasedOn="{StaticResource DefaultDataGridCellStyle}" />
    <Style TargetType="dataPrimitives:DataGridColumnHeader" BasedOn="{StaticResource DefaultDataGridColumnHeaderStyle}" />
    <Style TargetType="dataPrimitives:DataGridRowHeader" BasedOn="{StaticResource DefaultDataGridRowHeaderStyle}" />
    <Style TargetType="data:DataGridRow" BasedOn="{StaticResource DefaultDataGridRowStyle}" />
    <Style TargetType="data:DataGrid" BasedOn="{StaticResource DefaultDataGridStyle}" />
    <Style TargetType="System_Windows_Controls_Primitives:CalendarItem" BasedOn="{StaticResource DefaultCalendarItemStyle}" />
    <Style TargetType="controls:Calendar" BasedOn="{StaticResource DefaultCalendarStyle}" />
    <Style TargetType="System_Windows_Controls_Primitives:CalendarDayButton" BasedOn="{StaticResource DefaultCalendarDayButtonStyle}" />
    <Style TargetType="System_Windows_Controls_Primitives:CalendarButton" BasedOn="{StaticResource DefaultCalendarButtonStyle}" />
    <Style TargetType="System_Windows_Controls_Primitives:DatePickerTextBox" BasedOn="{StaticResource DefaultDatePickerTextBoxStyle}" />
    <Style TargetType="controls:DatePicker" BasedOn="{StaticResource DefaultDatePickerStyle}" />
    <Style TargetType="input:AutoCompleteBox" BasedOn="{StaticResource DefaultAutoCompleteBoxStyle}" />
    <Style TargetType="data:DataPager" BasedOn="{StaticResource DefaultDataPagerStyle}" />
    <Style TargetType="dataInput:Label" BasedOn="{StaticResource DefaultLabelStyle}" />
    <Style TargetType="controls:GridSplitter" BasedOn="{StaticResource DefaultGridSplitterStyle}" />
    <Style TargetType="controls:TabControl" BasedOn="{StaticResource DefaultTabControlStyle}" />
    <Style TargetType="controls:TabItem" BasedOn="{StaticResource DefaultTabItemStyle}" />
    <Style TargetType="controls:TreeView" BasedOn="{StaticResource DefaultTreeViewStyle}" />
    <Style TargetType="controls:TreeViewItem" BasedOn="{StaticResource DefaultTreeViewItemStyle}" />

</ResourceDictionary>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Romania Romania
I have been a software developer for a while and still find this an interesting job.

Comments and Discussions