Click here to Skip to main content
15,896,912 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:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    xmlns:System_Windows_Controls_Primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"
    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:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    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" mc:Ignorable="d">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/SLDynamicThemes2;component/Assets/Themes/Windows7/Brushes.xaml"/>
        <ResourceDictionary Source="/SLDynamicThemes2;component/Assets/Themes/Windows7/Fonts.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!--CommonValidationToolTipTemplate-->
    <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="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
            <Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
            <Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
            <Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
            <Border Background="#FFDC000C" 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>

    <!-- 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="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>
                                    </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="#FFFFFFFF" Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="FocusVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="FocusVisual" Fill="#66FFFFFF" HorizontalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" VerticalAlignment="Stretch"/>
                        <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="#FFDC000C" StrokeThickness="1" VerticalAlignment="Stretch"/>
                        <Rectangle x:Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!-- DataGridColumnHeader Style -->
    <Style TargetType="dataPrimitives:DataGridColumnHeader" x:Key="DefaultDataGridColumnHeaderStyle">
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Height" Value="38"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="dataPrimitives:DataGridColumnHeader">
                    <Grid x:Name="Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </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>
                        <Border x:Name="BackgroundBorder" Grid.ColumnSpan="2" Background="{StaticResource DataGridColumnHeaderBrush}" BorderThickness="0,1,0,0" BorderBrush="{StaticResource DataGridColumnHeaderBorderBrush}" />
                        <Border x:Name="MouseOverBorder" BorderBrush="#FFE3E8EE" BorderThickness="1" Opacity="0">
                            <Border BorderBrush="White" BorderThickness="1">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFF3F8FD" Offset="0"/>
                                        <GradientStop Color="#FFEFF3F9" Offset="1"/>
                                        <GradientStop Color="#FFF2F7FC" Offset="0.215"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Border>
                        <Border x:Name="PressedBorder" BorderBrush="#FFC1CCDA" BorderThickness="1" Opacity="0">
                            <Border BorderBrush="#FFD7DEE7" BorderThickness="0,1,0,0">
                                <Border BorderBrush="#FFEBEEF2" BorderThickness="0,1,0,0"/>
                            </Border>
                        </Border>
                        <Grid Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Path x:Name="SortIcon" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z " HorizontalAlignment="Center" Margin="4,2,0,0" RenderTransformOrigin=".5,.5" Stretch="Uniform" VerticalAlignment="Center" Width="8" Opacity="0">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0.812,0.5" StartPoint="0.188,0.5">
                                        <GradientStop Color="#FF3C596C" Offset="0"/>
                                        <GradientStop Color="#FFC4E3F4" Offset="1"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                                <Path.RenderTransform>
                                    <ScaleTransform ScaleY=".9" ScaleX=".9"/>
                                </Path.RenderTransform>
                            </Path>
                            <ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="4,2"/>
                        </Grid>
                        <Rectangle x:Name="VerticalSeparator" Grid.Column="1" Visibility="{TemplateBinding SeparatorVisibility}" VerticalAlignment="Stretch" Width="1">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFDFEAF7" Offset="0"/>
                                    <GradientStop Color="Transparent" Offset="1"/>
                                    <GradientStop Color="#FFE4EDF7" Offset="0.526"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- DataGridRowHeader Style-->
    <Style TargetType="dataPrimitives:DataGridRowHeader" x:Key="DefaultDataGridRowHeaderStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <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 BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverCurrentRowSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalCurrentRow">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph"/>

                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedBorder">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalEditingRow">
                                    <Storyboard>

                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CurrentRowGlyph"/>

                                    </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="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="CurrentRowGlyph"/>
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Storyboard.TargetName="EditingRowGlyph"/>
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="EditingRowGlyph"/>
                                        <ColorAnimation Duration="0" To="#FFDC000C" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="EditingRowGlyph"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Grid.ColumnSpan="2" Grid.RowSpan="3">
                            <Grid>
                                <Rectangle x:Name="RowInvalidVisualElement" Grid.ColumnSpan="2" Fill="#FFF7D8DB" Opacity="0" Grid.RowSpan="3" Stretch="Fill"/>
                                <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="Transparent" Grid.RowSpan="3" Stretch="Fill"/>
                                <Border x:Name="SelectedBorder" CornerRadius="2,0,0,2" BorderThickness="1,1,0,1" BorderBrush="{StaticResource ListItemSelectedBorderBrush}" Opacity="0" Background="{StaticResource ListItemSelectedBrush}" Grid.RowSpan="2" Grid.ColumnSpan="2" >
                                    <Border BorderBrush="{StaticResource ListItemSelectedInnerBorderBrush}" BorderThickness="1,1,0,1"/>
                                </Border>
                                <Border x:Name="MouseOverBorder" CornerRadius="2,0,0,2" BorderThickness="1,1,0,1" BorderBrush="{StaticResource ListItemMouseOverBorderBrush}" Opacity="0" Background="{StaticResource ListItemMouseOverBrush}" Grid.RowSpan="2" Grid.ColumnSpan="2" >
                                    <Border BorderThickness="1,1,0,1" CornerRadius="1">
                                        <Border.BorderBrush>
                                            <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                        </Border.BorderBrush>
                                    </Border>
                                </Border>
                            </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"/>

                        <Rectangle x:Name="InvalidVisualElement" Grid.ColumnSpan="2" Fill="#FFF7D8DB" Opacity="0" Grid.RowSpan="2"/>


                        <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,-.15">
                                    <GradientStop Color="#FF84E3FF" Offset="0"/>
                                    <GradientStop Color="#FF6ABFD8" Offset="0.5"/>
                                    <GradientStop Color="#FF5297AB" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Path x:Name="EditingRowGlyph" 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,-.15">
                                    <GradientStop Color="#FF84E3FF" Offset="0"/>
                                    <GradientStop Color="#FF6ABFD8" Offset="0.5"/>
                                    <GradientStop Color="#FF5297AB" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="SeparatorBrush" Value="{x:Null}"/>
    </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 BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="UnfocusedSelected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="Invalid">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BackgroundRectangle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Opacity="0" Grid.RowSpan="2"/>
                        <Rectangle x:Name="InvalidVisualElement" Grid.ColumnSpan="2" Fill="#FFF7D8DB" Opacity="0" Grid.RowSpan="2"/>
                        <Border x:Name="MouseOverBorder" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemMouseOverBorderBrush}" Opacity="0" Background="{StaticResource ListItemMouseOverBrush}" Grid.ColumnSpan="2" Grid.RowSpan="2" >
                            <Border BorderThickness="1,1,1,1" CornerRadius="1">
                                <Border.BorderBrush>
                                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                </Border.BorderBrush>
                            </Border>
                        </Border>
                        <Border x:Name="SelectedBorder" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemSelectedBorderBrush}" Opacity="0" Background="{StaticResource ListItemSelectedBrush}" Grid.ColumnSpan="2" Grid.RowSpan="2" >
                            <Border BorderBrush="{StaticResource ListItemSelectedInnerBorderBrush}" BorderThickness="1,1,1,1"/>
                        </Border>
                        <dataPrimitives:DataGridRowHeader x:Name="RowHeader" dataPrimitives:DataGridFrozenGrid.IsFrozen="True" Grid.RowSpan="3" SeparatorBrush="{x:Null}"/>
                        <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>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!-- DataGrid Style-->
    <Style TargetType="data:DataGrid" x:Key="DefaultDataGridStyle">
        <Setter Property="RowBackground" Value="#FFFFFFFF"/>
        <Setter Property="AlternatingRowBackground" Value="#FFFFFFFF"/>
        <Setter Property="Background" Value="#FFFCFCFC"/>
        <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="GridLinesVisibility" Value="None" />
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="DragIndicatorStyle">
            <Setter.Value>
                <Style TargetType="ContentControl">
                    <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
                    <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
                    <Setter Property="FontSize" Value="13"/>
                    <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="#66808080" Stretch="Fill"/>
                                    <Rectangle x:Name="BackgroundGradient" Grid.ColumnSpan="2" Opacity="0" Stretch="Fill">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.015"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.6"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </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="#7FFFFFFF" 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="#FF3F4346"/>
                    <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="IsTabStop" Value="True"/>
        <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>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualElement">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border CornerRadius="2">
                            <Grid x:Name="Root" Background="#FFFBFBFB">
                                <Grid.Resources>
                                    <ControlTemplate x:Key="TopLeftHeaderTemplate" TargetType="dataPrimitives:DataGridColumnHeader">
                                        <Grid x:Name="Root">
                                            <Grid.RowDefinitions>
                                                <RowDefinition/>
                                                <RowDefinition/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Border BorderThickness="0,1,0,0" Grid.RowSpan="2">
                                                <Border.BorderBrush>
                                                    <LinearGradientBrush EndPoint="0.003,0.016" StartPoint="1.002,0.016">
                                                        <GradientStop Color="#FFD6E5F5" Offset="0"/>
                                                        <GradientStop Color="#00E4EEF8" Offset="1"/>
                                                        <GradientStop Color="#FFE4EEF8" Offset="0.503"/>
                                                    </LinearGradientBrush>
                                                </Border.BorderBrush>
                                                <Rectangle Stretch="Fill" StrokeThickness="1"/>
                                            </Border>
                                            <Rectangle Height="1" Grid.RowSpan="2" StrokeThickness="1" VerticalAlignment="Bottom" Width="Auto"/>
                                        </Grid>
                                    </ControlTemplate>
                                    <ControlTemplate x:Key="TopRightHeaderTemplate" TargetType="dataPrimitives:DataGridColumnHeader">
                                        <Grid x:Name="RootElement">
                                            <Grid.RowDefinitions>
                                                <RowDefinition/>
                                                <RowDefinition/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Border BorderThickness="0,1,0,0" Grid.RowSpan="2">
                                                <Border.BorderBrush>
                                                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                                        <GradientStop Color="#FFD6E5F5" Offset="0"/>
                                                        <GradientStop Color="#00DCE9F6" Offset="0.712"/>
                                                        <GradientStop Color="#7FDCE9F6" Offset="0.346"/>
                                                    </LinearGradientBrush>
                                                </Border.BorderBrush>
                                                <Rectangle Stretch="Fill"/>
                                            </Border>
                                        </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" Grid.Row="0" Template="{StaticResource TopLeftHeaderTemplate}" Width="22"/>
                                <Border Height="15" Grid.ColumnSpan="3" VerticalAlignment="Top">
                                    <Border.OpacityMask>
                                        <RadialGradientBrush Center="0.503,0.005" GradientOrigin="0.503,0.005" RadiusY="0.984">
                                            <GradientStop Color="Black" Offset="0"/>
                                            <GradientStop Color="Transparent" Offset="1"/>
                                            <GradientStop Color="#B23E3E3E" Offset="0.654"/>
                                        </RadialGradientBrush>
                                    </Border.OpacityMask>
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFECF1F8" Offset="0"/>
                                            <GradientStop Color="#FFFBFBFC" Offset="1"/>
                                            <GradientStop Color="#FFEEF3F9" Offset="0.247"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <dataPrimitives:DataGridColumnHeadersPresenter x:Name="ColumnHeadersPresenter" Grid.Column="1" Grid.Row="0"/>
                                <dataPrimitives:DataGridColumnHeader x:Name="TopRightCornerHeader" Grid.Column="2" Template="{StaticResource TopRightHeaderTemplate}" Grid.Row="0"/>
                                <Rectangle x:Name="ColumnHeadersAndRowsSeparator" Grid.ColumnSpan="3" Fill="#FFC9CACA" Height="1" StrokeThickness="1" VerticalAlignment="Bottom" Width="Auto" Visibility="Collapsed" Grid.Row="0"/>
                                <dataPrimitives:DataGridRowsPresenter x:Name="RowsPresenter" Margin="0" Grid.ColumnSpan="2" Grid.Row="1"/>
                                <Rectangle x:Name="BottomRightCorner" Grid.Column="2" Grid.Row="2"/>
                                <Rectangle x:Name="BottomLeftCorner" Grid.ColumnSpan="2" Grid.Row="2"/>
                                <ScrollBar x:Name="VerticalScrollbar" Grid.Column="2" 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" 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="#8CFFFFFF" CornerRadius="2" HorizontalAlignment="Stretch" Height="Auto" IsHitTestVisible="False" Opacity="0" VerticalAlignment="Stretch" Width="Auto"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="BorderBrush" Value="{x:Null}"/>
    </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="#8CFFFFFF"/>
                        </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>
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Margin="0,2,0,2">
                            <Grid Margin="1">
                                <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 SystemBlue}" 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 TextBrush}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="1,5,1,9" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                        </Grid>
                                    </ControlTemplate>
                                    <DataTemplate x:Name="DayTitleTemplate">
                                        <TextBlock
                                              FontSize="9.5" 
                                              Text="{Binding}"
                                              Margin="0,4,0,4"
                                              HorizontalAlignment="Center"
                                              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 SystemBlue}" 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="#11E5EBF1" Opacity="1" Stretch="Fill"/>
                                            <Grid>
                                                <Path x:Name="IconPath" Data="M288.75,232.25 L288.75,240.625 L283,236.625 z" Fill="#FF333333" 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 SystemBlue}" 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="#11E5EBF1" Opacity="1" Stretch="Fill"/>
                                            <Grid>
                                                <Path x:Name="IconPath" Data="M282.875,231.875 L282.875,240.375 L288.625,236 z" Fill="#FF333333" HorizontalAlignment="Right" Height="10" Margin="0,-6,14,0" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
                                            </Grid>
                                        </Grid>
                                    </ControlTemplate>
                                </Grid.Resources>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Button x:Name="PreviousButton" HorizontalAlignment="Left" Height="20" Template="{StaticResource PreviousButtonTemplate}" Width="28"/>
                                <Button x:Name="HeaderButton" Grid.Column="1" FontSize="10.5" HorizontalAlignment="Center" Template="{StaticResource HeaderButtonTemplate}" VerticalAlignment="Center"/>
                                <Button x:Name="NextButton" Grid.Column="2" HorizontalAlignment="Right" Height="20" Template="{StaticResource NextButtonTemplate}" Visibility="Collapsed" Width="28"/>
                                <Grid x:Name="MonthView" Grid.ColumnSpan="3" Margin="6,-1,6,6" Grid.Row="1" Visibility="Collapsed">
                                    <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.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>
                                <Grid x:Name="YearView" Grid.ColumnSpan="3" Margin="6,-3,7,6" Grid.Row="1" Visibility="Collapsed">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                </Grid>
                                <Border BorderBrush="#FFFFFFFF" BorderThickness="1" HorizontalAlignment="Left" Height="2" VerticalAlignment="Top" Width="2" Visibility="Collapsed"/>
                            </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>
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource WhiteColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
    </Style>
    
    <!--Calendar Style-->
    <Style TargetType="controls:Calendar" x:Key="DefaultCalendarStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource WhiteColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
        <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}" Foreground="{StaticResource TextBrush}"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>
    
    <!--CalendarDayButton Style-->
    <Style TargetType="System_Windows_Controls_Primitives:CalendarDayButton" x:Key="DefaultCalendarDayButtonStyle">
        <Setter Property="Background" Value="#FFBADDE9"/>
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="MinWidth" Value="5"/>
        <Setter Property="MinHeight" Value="5"/>
        <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 BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard/>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedBorder"/>
                                        <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 BeginTime="00:00:00" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CalendarButtonFocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="CalendarButtonFocused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusInnerVisual" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CalendarButtonUnfocused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusInnerVisual" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                        </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="#FF777777" Storyboard.TargetProperty="(ContentControl.Foreground).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="Content"/>
                                        <ColorAnimation Duration="0" To="#FF777777" 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"/>
                                    </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>
                        <Border x:Name="MouseOverBorder" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemMouseOverBorderBrush}" Opacity="0" Background="{StaticResource ListItemMouseOverBrush}" >
                            <Border BorderThickness="1" CornerRadius="1">
                                <Border.BorderBrush>
                                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                </Border.BorderBrush>
                            </Border>
                        </Border>
                        <Border x:Name="SelectedBorder" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemSelectedBorderBrush}" Opacity="0" Background="{StaticResource ListItemSelectedBrush}" >
                            <Border BorderBrush="{StaticResource ListItemSelectedInnerBorderBrush}" BorderThickness="1"/>
                        </Border>
                        <Border x:Name="TodayBackground" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemSelectedBorderBrush}" Opacity="0" Background="{StaticResource ListItemSelectedBrush}" >
                            <Border BorderBrush="{StaticResource ListItemSelectedInnerBorderBrush}" BorderThickness="1"/>
                        </Border>
                        <Rectangle x:Name="FocusInnerVisual" Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2" Opacity="0"/>
                        <Rectangle x:Name="Background" Fill="{TemplateBinding Background}" Opacity="0" RadiusY="1" RadiusX="1"/>
                        <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="#FFFFFFFF" Offset="0"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                    <GradientStop Color="#FF333333" Offset="0"/>
                                    <GradientStop Color="#FF333333" 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="#FF000000" HorizontalAlignment="Stretch" Margin="3" Opacity="0" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Stretch"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>
    
    <!--CalendarButton Style-->
    <Style TargetType="System_Windows_Controls_Primitives:CalendarButton" x:Key="DefaultCalendarButtonStyle">
        <Setter Property="Background" Value="#FFBADDE9"/>
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <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 BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </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="#FF777777" 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>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusInnerVisual" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CalendarButtonUnfocused">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="MouseOverBorder" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemMouseOverBorderBrush}" Opacity="0" Background="{StaticResource ListItemMouseOverBrush}" >
                            <Border BorderThickness="1" CornerRadius="1">
                                <Border.BorderBrush>
                                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                </Border.BorderBrush>
                            </Border>
                        </Border>
                        <Border x:Name="SelectedBorder" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemSelectedBorderBrush}" Opacity="0" Background="{StaticResource ListItemSelectedBrush}" >
                            <Border BorderBrush="{StaticResource ListItemSelectedInnerBorderBrush}" BorderThickness="1"/>
                        </Border>
                        <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="#FF333333" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="1,0,1,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <Rectangle x:Name="FocusInnerVisual" Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2" Opacity="0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!--ChildWindow Style-->
    <Style x:Key="ChildWindowStyle"  TargetType="controls:ChildWindow">
        <Setter Property="Background" Value="#FFF0F0F0" />
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="TabNavigation" Value="Cycle"/>
        <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 Property="BorderBrush" Value="{StaticResource NormalBorderBrush}" />
        <Setter Property="OverlayBrush" Value="#7F000000"/>
        <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="Foreground" Value="{StaticResource TextBrush}"/>
                                <Setter Property="Padding" Value="3"/>
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid x:Name="grid" Background="#02FFFFFF" HorizontalAlignment="Center" Height="14" VerticalAlignment="Center" Width="31">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorderYellow" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverBlurBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
                                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Visible</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
                                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Visible</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
                                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Visible</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <DoubleAnimation Duration="0" To="0.95" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PressedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimation Duration="0" To="0.85" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
                                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Visible</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
                                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Visible</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
                                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Visible</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </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>
                                                <Border BorderBrush="#FF391007" BorderThickness="1" CornerRadius="0,0,2,2">
                                                    <Grid>
                                                        <Border x:Name="MainBorder" BorderThickness="1" CornerRadius="0,0,1,1">
                                                            <Border.Background>
                                                                <LinearGradientBrush EndPoint="0.964,0.5" StartPoint="0.03,0.5">
                                                                    <GradientStop Color="#FFAB4233" Offset="0"/>
                                                                    <GradientStop Color="#FFAB4233" Offset="1"/>
                                                                    <GradientStop Color="#FFBF462F" Offset="0.196"/>
                                                                    <GradientStop Color="#FFBF462F" Offset="0.849"/>
                                                                    <GradientStop Color="#FFD04830" Offset="0.606"/>
                                                                    <GradientStop Color="#FFD04830" Offset="0.404"/>
                                                                    <GradientStop Color="#FFB04333" Offset="0.093"/>
                                                                    <GradientStop Color="#FFB04333" Offset="0.92"/>
                                                                </LinearGradientBrush>
                                                            </Border.Background>
                                                            <Border.BorderBrush>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFE9B5A5" Offset="0"/>
                                                                    <GradientStop Color="#FFE9B5A5" Offset="1"/>
                                                                    <GradientStop Color="#FFC88982" Offset="0.5"/>
                                                                    <GradientStop Color="#FFCA928A" Offset="0.772"/>
                                                                </LinearGradientBrush>
                                                            </Border.BorderBrush>
                                                        </Border>
                                                        <Border x:Name="MouseOverBorder" BorderThickness="1" CornerRadius="0,0,1,1" Opacity="0">
                                                            <Border.Background>
                                                                <LinearGradientBrush EndPoint="0.964,0.5" StartPoint="0.03,0.5">
                                                                    <GradientStop Color="#FFA8200D" Offset="0"/>
                                                                    <GradientStop Color="#FFA8200D" Offset="1"/>
                                                                    <GradientStop Color="#FFCA270A" Offset="0.192"/>
                                                                    <GradientStop Color="#FFCA270A" Offset="0.827"/>
                                                                    <GradientStop Color="#FFD5290A" Offset="0.606"/>
                                                                    <GradientStop Color="#FFD5290A" Offset="0.404"/>
                                                                    <GradientStop Color="#FFB4230C" Offset="0.093"/>
                                                                    <GradientStop Color="#FFB4230C" Offset="0.92"/>
                                                                </LinearGradientBrush>
                                                            </Border.Background>
                                                            <Border.BorderBrush>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFE9B5A5" Offset="0"/>
                                                                    <GradientStop Color="#FFE9B5A5" Offset="1"/>
                                                                    <GradientStop Color="#FFC88982" Offset="0.5"/>
                                                                    <GradientStop Color="#FFCA928A" Offset="0.772"/>
                                                                </LinearGradientBrush>
                                                            </Border.BorderBrush>
                                                        </Border>
                                                        <Border x:Name="PressedBorder" BorderThickness="1" CornerRadius="0,0,1,1" Opacity="0">
                                                            <Border.Background>
                                                                <LinearGradientBrush EndPoint="0.964,0.5" StartPoint="0.03,0.5">
                                                                    <GradientStop Color="#FF521307" Offset="0"/>
                                                                    <GradientStop Color="#FF521307" Offset="1"/>
                                                                    <GradientStop Color="#FF841B09" Offset="0.192"/>
                                                                    <GradientStop Color="#FF841B09" Offset="0.827"/>
                                                                    <GradientStop Color="#FF8B2008" Offset="0.606"/>
                                                                    <GradientStop Color="#FF8B2008" Offset="0.404"/>
                                                                    <GradientStop Color="#FF671508" Offset="0.093"/>
                                                                    <GradientStop Color="#FF671508" Offset="0.92"/>
                                                                </LinearGradientBrush>
                                                            </Border.Background>
                                                            <Border.BorderBrush>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#FFE9B5A5" Offset="0"/>
                                                                    <GradientStop Color="#FFE9B5A5" Offset="1"/>
                                                                    <GradientStop Color="#FFC88982" Offset="0.5"/>
                                                                    <GradientStop Color="#FFCA928A" Offset="0.772"/>
                                                                </LinearGradientBrush>
                                                            </Border.BorderBrush>
                                                        </Border>
                                                        <Border x:Name="MouseOverBorderYellow" Opacity="0">
                                                            <Border.Background>
                                                                <RadialGradientBrush Center="0.497,0.987" GradientOrigin="0.497,0.987">
                                                                    <GradientStop Color="#FFECC532" Offset="0"/>
                                                                    <GradientStop Color="Transparent" Offset="1"/>
                                                                </RadialGradientBrush>
                                                            </Border.Background>
                                                        </Border>
                                                        <Border x:Name="MouseOverBlurBorder" BorderBrush="#FFFF3100" BorderThickness="1" Margin="-1" CornerRadius="2" Opacity="0">
                                                            <Border.Effect>
                                                                <BlurEffect Radius="30"/>
                                                            </Border.Effect>
                                                        </Border>
                                                        <Border x:Name="TopLineBorder" BorderThickness="0,1,0,0">
                                                            <Border.BorderBrush>
                                                                <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                                            </Border.BorderBrush>
                                                        </Border>
                                                        <Border x:Name="ShineBorder" BorderThickness="0,1,0,0">
                                                            <Border.Background>
                                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                    <GradientStop Color="#B2FFFFFF" Offset="0"/>
                                                                    <GradientStop Color="Transparent" Offset="1"/>
                                                                    <GradientStop Color="#008A8A8A" Offset="0.5"/>
                                                                    <GradientStop Color="#4CE4E4E4" Offset="0.49"/>
                                                                </LinearGradientBrush>
                                                            </Border.Background>
                                                        </Border>
                                                    </Grid>
                                                </Border>
                                                <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="#14C51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="#14C51900" 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="#1EC51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="#1EC51900" 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="#FFC51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" Stretch="Fill" Stroke="#FFC51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9"/>
                                                <Path x:Name="X" 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="#FFFFFFFF" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="0.7" Stretch="Fill" VerticalAlignment="Center" Width="9">
                                                    <Path.Stroke>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FF313131" Offset="1"/>
                                                            <GradientStop Color="#FF8E9092" Offset="0"/>
                                                        </LinearGradientBrush>
                                                    </Path.Stroke>
                                                </Path>
                                            </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"/>
                                        </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="#14000000" BorderThickness="1" Background="#14000000" CornerRadius="2" HorizontalAlignment="Stretch" Margin="-1" VerticalAlignment="Stretch"/>
                            <Border BorderBrush="#0F000000" BorderThickness="1" Background="#0F000000" CornerRadius="2.25" HorizontalAlignment="Stretch" Margin="-2" VerticalAlignment="Stretch"/>
                            <Border BorderBrush="#0C000000" BorderThickness="1" Background="#0C000000" CornerRadius="2.5" HorizontalAlignment="Stretch" Margin="-3" VerticalAlignment="Stretch"/>
                            <Border BorderBrush="#0A000000" BorderThickness="1" Background="#0A000000" CornerRadius="2.75" HorizontalAlignment="Stretch" Margin="-4" VerticalAlignment="Stretch"/>
                            <Border x:Name="MainBorder" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                <Border.BorderBrush>
                                    <LinearGradientBrush EndPoint="1.002,0.996" StartPoint="0.835,-0.05">
                                        <GradientStop Color="White" Offset="0"/>
                                        <GradientStop Color="#FF28CFE4" Offset="0.228"/>
                                        <GradientStop Color="White" Offset="0.202"/>
                                    </LinearGradientBrush>
                                </Border.BorderBrush>
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF98B4D0" Offset="0"/>
                                        <GradientStop Color="#FFB9D1EA" Offset="1"/>
                                        <GradientStop Color="#FFB9D1EA" Offset="0.17"/>
                                        <GradientStop Color="#FFBAD2EA" Offset="0.321"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <Border x:Name="MainInsideBorder" CornerRadius="1.5" Margin="1">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Border x:Name="SideShineBorder" BorderThickness="5,0" Grid.RowSpan="2" CornerRadius="1" Margin="1,0">
                                            <Border.BorderBrush>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Offset="0"/>
                                                    <GradientStop Color="Transparent" Offset="1"/>
                                                    <GradientStop Color="#7AFFFFFF" Offset="0.529"/>
                                                    <GradientStop Color="Transparent" Offset="0.538"/>
                                                    <GradientStop Color="#4CFFFFFF" Offset="0.311"/>
                                                </LinearGradientBrush>
                                            </Border.BorderBrush>
                                        </Border>
                                        <Border x:Name="Chrome" BorderBrush="#FFFFFFFF" Width="Auto" Background="Transparent" Margin="0,3,0,2">
                                            <Grid Height="Auto" Width="Auto" VerticalAlignment="Center">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition/>
                                                    <ColumnDefinition Width="38"/>
                                                </Grid.ColumnDefinitions>
                                                <ContentControl Content="{TemplateBinding Title}" FontFamily="Segoe UI, Lucida Sans Unicode, Verdana" FontSize="12" HorizontalAlignment="Stretch" IsTabStop="False" Margin="6,0,6,0" VerticalAlignment="Center"/>
                                                <Button x:Name="CloseButton" Grid.Column="1" HorizontalAlignment="Center" Height="14" IsTabStop="False" Style="{StaticResource ButtonStyle}" VerticalAlignment="Center" Margin="0,-6,6,0"/>
                                            </Grid>
                                        </Border>
                                        <Border Background="{TemplateBinding Background}" Margin="7,2,7,7" Grid.Row="1">
                                            <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                        </Border>
                                    </Grid>
                                </Border>
                            </Border>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!--DatePickerTextBox Style-->
    <Style TargetType="System_Windows_Controls_Primitives:DatePickerTextBox" x:Key="DefaultDatePickerTextBoxStyle">
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource WhiteColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}"/>
        <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">
                        <Grid.Resources>
                            <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA"/>
                        </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>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </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="Opacity" Storyboard.TargetName="FocusVisualElement">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" Opacity="1" />
                            <Border x:Name="MouseOverBorder" BorderThickness="1,1,1,1" BorderBrush="{StaticResource TextBoxMouseOverBorderBrush}" CornerRadius="1,1,1,1" Opacity="0" />
                            <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource TextBoxMouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" CornerRadius="1" Opacity="0"/>
                            <Border x:Name="DisabledVisualElement" BorderBrush="{StaticResource DisabledBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" Opacity="0" Background="{StaticResource DisabledBackgroundBrush}"/>

                            <Grid x:Name="WatermarkContent">
                                <Border x:Name="ContentElement" BorderThickness="1" Padding="{TemplateBinding Padding}"/>
                                <Border x:Name="ContentElement2" 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>
                                <Border x:Name="FocusVisual" BorderBrush="#FF6DBDD1" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" IsHitTestVisible="False" Opacity="0"/>
                            </Grid>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="1"/>
    </Style>

    <!--DatePicker Style-->
    <Style TargetType="controls:DatePicker" x:Key="DefaultDatePickerStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="#FFFFFFFF"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="SelectionBackground" Value="#FF444444"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint=".5,0" StartPoint=".5,1">
                    <GradientStop Color="#FF617584" Offset="0"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FFA3AEB9" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <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="#8CFFFFFF"/>
                            <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>
                                                    <ColorAnimation Duration="0" To="#FF448DCA" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
                                                    <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#8AFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverPath" d:IsOptimized="True"/>
                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverRectangle" d:IsOptimized="True"/>
                                                    <ColorAnimation Duration="0" To="#FF3C7FAF" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundGradient" d:IsOptimized="True"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#FF448DCA"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames BeginTime="0" Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </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="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid Background="#11FFFFFF" 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="Highlight" BorderBrush="#FF6DBDD1" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius="0,0,1,1" Margin="-1" Opacity="0" Grid.Row="0" Grid.RowSpan="4"/>
                                        <Border x:Name="Background" BorderBrush="#FFFFFFFF" BorderThickness="1" Background="#FF1F3B53" Grid.ColumnSpan="4" CornerRadius=".5" Margin="0,-1,0,0" Opacity="1" Grid.Row="1" Grid.RowSpan="3"/>
                                        <Border x:Name="BackgroundGradient" BorderBrush="#BF000000" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius=".5" Margin="0,-1,0,0" Opacity="1" Grid.Row="1" Grid.RowSpan="3">
                                            <Border.Background>
                                                <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                    <GradientStop Color="#E5FFFFFF" Offset="0.625"/>
                                                    <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Rectangle Grid.ColumnSpan="4" Grid.RowSpan="1" StrokeThickness="1" Fill="{StaticResource NormalBrush}" Stroke="{StaticResource NormalBorderBrush}"/>
                                        <Rectangle x:Name="MouseOverRectangle" Grid.ColumnSpan="4" Grid.RowSpan="1" StrokeThickness="1" Stroke="{StaticResource MouseOverBorderBrush}" Fill="{StaticResource MouseOverBrush}" Opacity="0"/>
                                        <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" HorizontalAlignment="Center" Margin="4,3,4,3" Grid.Row="1" Grid.RowSpan="3" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center">
                                            <Path.Fill>
                                                <SolidColorBrush Color="{StaticResource BlackColor}"/>
                                            </Path.Fill>
                                        </Path>
                                        <Path x:Name="MouseOverPath" 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" HorizontalAlignment="Center" Margin="4,3,4,3" Grid.Row="1" Grid.RowSpan="3" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" UseLayoutRounding="False" Opacity="0">
                                            <Path.Fill>
                                                <SolidColorBrush Color="{StaticResource SystemBlue}"/>
                                            </Path.Fill>
                                        </Path>
                                        <Ellipse Grid.ColumnSpan="4" HorizontalAlignment="Center" Height="3" StrokeThickness="0" VerticalAlignment="Center" Width="3">
                                            <Ellipse.Fill>
                                                <SolidColorBrush Color="{StaticResource BlackColor}"/>
                                            </Ellipse.Fill>
                                        </Ellipse>
                                        <Border x:Name="DisabledVisual" BorderBrush="#B2FFFFFF" BorderThickness="1" Grid.ColumnSpan="4" CornerRadius="0,0,.5,.5" Opacity="0" Grid.Row="0" Grid.RowSpan="4"/>
                                    </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>
                            <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>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <System_Windows_Controls_Primitives:DatePickerTextBox x:Name="TextBox" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="0" Padding="{TemplateBinding Padding}" SelectionBackground="{TemplateBinding SelectionBackground}" BorderBrush="{StaticResource TextBoxBorderBrush}">
                            <System_Windows_Controls_Primitives:DatePickerTextBox.Background>
                                <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                            </System_Windows_Controls_Primitives:DatePickerTextBox.Background>
                        </System_Windows_Controls_Primitives:DatePickerTextBox>
                        <!--<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"/>-->
                        <Button x:Name="Button" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" Foreground="{TemplateBinding Foreground}" Margin="2,0,2,0" Template="{StaticResource DropDownButtonTemplate}" Padding="3,1,3,2"/>
                        <Grid x:Name="DisabledVisual" Grid.ColumnSpan="2" IsHitTestVisible="False" Opacity="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle Fill="#8CFFFFFF" RadiusY="1" RadiusX="1"/>
                            <Rectangle Grid.Column="1" Fill="#8CFFFFFF" Height="18" Margin="2,0,2,0" RadiusY="1" RadiusX="1" Width="19"/>
                        </Grid>
                        <Popup x:Name="Popup"/>
                        <Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="{TemplateBinding BorderThickness}" Visibility="Collapsed" CornerRadius="1">
                            <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" Value="true" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </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="#FFDC000C" Margin="-1,3,0,0"/>
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="-1,3,0,0"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!--AutoCompleteBox Style-->
    <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">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="#FFFFFFFF"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="MinWidth" Value="45"/>
        <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" IsTabStop="True" Margin="0" Padding="{TemplateBinding Padding}" />
                        <Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" 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="#FFDC000C" Margin="1,3,0,0"/>
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="1,3,0,0"/>
                            </Grid>
                        </Border>
                        <Popup x:Name="Popup">
                            <Grid Opacity="{TemplateBinding Opacity}">
                                <Border x:Name="PopupBorder" BorderThickness="0" Background="#11000000" HorizontalAlignment="Stretch" Opacity="0">
                                    <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="#FFDDDDDD" Offset="0"/>
                                                <GradientStop Color="#AADDDDDD" 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 ControlBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <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="#00000000"/>
                    <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
                    <Setter Property="FontSize" Value="13"/>
                    <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="#FFFFFFFF" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
                                                    <ColorAnimation Duration="0" To="#FFCCD1D6" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="InnerBtnBorder"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
                                                    <ColorAnimation Duration="0" To="#FFCCD1D6" 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="#00FFFFFF" BorderThickness="{TemplateBinding BorderThickness}" Background="#7FA9A9A9" CornerRadius="3" Opacity="0"/>
                                    <Border x:Name="OuterBtnBorder" BorderBrush="#00FFFFFF" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3">
                                        <Border x:Name="InnerBtnBorder" BorderBrush="#00CCD1D6" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                            <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                        </Border>
                                    </Border>
                                    <Border x:Name="FocusVisualElement" BorderBrush="#FF6DBDD1" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" 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="#00000000"/>
                            <SolidColorBrush x:Key="ForegroundColor" Color="#FF000000"/>
                            <SolidColorBrush x:Key="BorderBrushColor" Color="#FFFFFFFF"/>
                            <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="#FFFFFFFF" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
                                                    <ColorAnimation Duration="0" To="#FFCCD1D6" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="InnerBtnBorder"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(BorderBrush).Color" Storyboard.TargetName="OuterBtnBorder"/>
                                                    <ColorAnimation Duration="0" To="#00FFFFFF" 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="#00FFFFFF" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3">
                                        <Border x:Name="InnerBtnBorder" BorderBrush="#00CCD1D6" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                            <ContentPresenter x:Name="path" Content="{TemplateBinding Content}"/>
                                        </Border>
                                    </Border>
                                    <Border x:Name="FocusVisualElement" BorderBrush="#FF6DBDD1" 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="#FFFFFFFF"/>
                                <Setter Property="Foreground" Value="#FF000000"/>
                                <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>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </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="Opacity" Storyboard.TargetName="FocusVisualElement">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Unfocused"/>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>

                                                <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" Opacity="1" />
                                                <Border x:Name="MouseOverBorder" BorderThickness="1,1,1,1" BorderBrush="{StaticResource TextBoxMouseOverBorderBrush}" CornerRadius="1,1,1,1" Opacity="0" />
                                                <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource TextBoxMouseOverBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" CornerRadius="1" Opacity="0"/>
                                                <Border x:Name="DisabledVisualElement" BorderBrush="{StaticResource DisabledBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" Opacity="0" Background="{StaticResource DisabledBackgroundBrush}"/>


                                                <Grid>
                                                    <Border x:Name="ReadOnlyVisualElement" Background="#72F7F7F7" Opacity="0"/>
                                                    <Border >
                                                        <ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Margin="0,-3,0,0" Padding="{TemplateBinding Padding}" VerticalAlignment="Center"/>
                                                    </Border>
                                                </Grid>



                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentPageTextBox">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentPagePrefixTextBlock">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CurrentPageSuffixTextBlock">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </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">
                                <Button x:Name="FirstPageButton" BorderThickness="1" Foreground="{StaticResource ForegroundColor}" HorizontalAlignment="Right" Height="20" Padding="1" VerticalAlignment="Center" Width="20">
                                    <Grid Height="9" Width="8">
                                        <Path Data="M0,1 L1,0 L1,2 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Right" Height="9" Stretch="Fill" Width="5"/>
                                        <Rectangle Fill="{TemplateBinding Foreground}" HorizontalAlignment="Left" Width="2"/>
                                    </Grid>
                                </Button>
                                <Button x:Name="PreviousPageButton" BorderThickness="1" Foreground="{StaticResource ForegroundColor}" HorizontalAlignment="Right" Height="20" Padding="1" VerticalAlignment="Center" Width="20">
                                    <Path Data="M0,1 L1,0 L1,2 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" Height="9" Stretch="Fill" Width="5"/>
                                </Button>
                                <Border x:Name="Separator1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,0,1,0" Background="#FFCCD1D6" Margin="0,3,0,3" Width="1"/>
                                <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"/>
                                    <TextBox x:Name="CurrentPageTextBox" BorderBrush="{TemplateBinding BorderBrush}" Foreground="{TemplateBinding Foreground}" Height="Auto" Margin="4,2,4,2" Style="{StaticResource PagingTextBoxStyle}" TextWrapping="Wrap" Width="40"/>
                                    <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="#FFCCD1D6" Margin="0,3,0,3" Width="1"/>
                                <Button x:Name="NextPageButton" BorderThickness="1" Foreground="{StaticResource ForegroundColor}" HorizontalAlignment="Right" Height="20" Padding="1" VerticalAlignment="Center" Width="20">
                                    <Path Data="M0,0 L1,1 L0,2 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" Height="9" Stretch="Fill" Width="5"/>
                                </Button>
                                <Button x:Name="LastPageButton" BorderThickness="1" Foreground="{StaticResource ForegroundColor}" HorizontalAlignment="Right" Height="20" Padding="1" VerticalAlignment="Center" Width="20">
                                    <Grid Height="9" Width="8">
                                        <Path Data="M0,0 L1,1 L0,2 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Left" Height="9" Stretch="Fill" Width="5"/>
                                        <Rectangle Fill="{TemplateBinding Foreground}" HorizontalAlignment="Right" Width="2"/>
                                    </Grid>
                                </Button>
                            </StackPanel>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </Style>

    <!---Label Style-->
    <Style TargetType="dataInput:Label" x:Key="DefaultLabelStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <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>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentControl" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.2"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </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 Storyboard.TargetProperty="(Control.FontWeight)" Storyboard.TargetName="ContentControl">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <FontWeight>SemiBold</FontWeight>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <!--<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="FontWeight" Storyboard.TargetName="ContentControl">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Bold"/>
										</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}" Foreground="{TemplateBinding Foreground}" 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}"/>
                        </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">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource WhiteColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="IsTabStop" Value="true"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="PreviewStyle">
            <Setter.Value>
                <Style TargetType="Control">
                    <Setter Property="Background" Value="#FF868686"/>
                    <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}" Stroke="{TemplateBinding BorderBrush}"/>
                        <Grid x:Name="HorizontalTemplate" Height="10">
                            <StackPanel Height="6" VerticalAlignment="Center">
                                <Rectangle Height="1" Margin="1" StrokeThickness="0" Width="10">
                                    <Rectangle.Fill>
                                        <SolidColorBrush Color="{StaticResource ScrollBarDarkGlyph}"/>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Height="1" Margin="1" StrokeThickness="0" Width="10">
                                    <Rectangle.Fill>
                                        <SolidColorBrush Color="{StaticResource ScrollBarDarkGlyph}"/>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </StackPanel>
                        </Grid>
                        <Grid x:Name="VerticalTemplate" Visibility="Collapsed" Width="10">
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Width="6">
                                <Rectangle Height="10" Margin="1" StrokeThickness="0" Width="1">
                                    <Rectangle.Fill>
                                        <SolidColorBrush Color="{StaticResource ScrollBarDarkGlyph}"/>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle Height="10" Margin="1" StrokeThickness="0" Width="1">
                                    <Rectangle.Fill>
                                        <SolidColorBrush Color="{StaticResource ScrollBarDarkGlyph}"/>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </StackPanel>
                        </Grid>
                        <Rectangle x:Name="FocusVisual" IsHitTestVisible="false" Opacity="0" Stroke="{StaticResource FocusedBrush}" StrokeThickness="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
    </Style>

    <!--TabControl Style-->
    <Style TargetType="controls:TabControl" x:Key="DefaultTabControlStyle">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource WhiteColor}"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
        <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="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualBottom">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.51"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualLeft">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualRight">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </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="1,2,2,-1" Canvas.ZIndex="100"/>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" MinWidth="10" MinHeight="10" Grid.Row="1">
                                <ContentPresenter x:Name="ContentTop" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            </Border>
                            <Border x:Name="DisabledVisualTop" Background="{StaticResource DisabledBackgroundBrush}" 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="1,-1,2,2" Grid.Row="1" Canvas.ZIndex="100"/>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" 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 DisabledBackgroundBrush}" 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,1,-1,2" Canvas.ZIndex="100"/>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" 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 DisabledBackgroundBrush}" Grid.Column="1"  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="100"/>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" 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 DisabledBackgroundBrush}" 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="IsTabStop" Value="False"/>
        <Setter Property="Background" Value="{StaticResource NormalBrush}"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
        <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 BeginTime="00:00:00" Storyboard.TargetName="TopMouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BottomMouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LeftMouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RightMouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HeaderTopUnselected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualTopUnSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HeaderTopSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualTopSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HeaderBottomUnselected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualBottomUnSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HeaderBottomSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualBottomSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HeaderLeftUnselected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualLeftUnSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HeaderLeftSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualLeftSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>


                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HeaderRightUnselected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualRightUnSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>

                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="HeaderRightSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualRightSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5"/>
                                        </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>
                                        <!--<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualTop">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualBottom">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualLeft">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualRight">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
										</ObjectAnimationUsingKeyFrames>-->
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="TemplateTopSelected" Visibility="Collapsed" Canvas.ZIndex="1">


                            <Border x:Name="TopSelected" BorderThickness="1,1,1,0" BorderBrush="{TemplateBinding BorderBrush}" Margin="-1,-2,-1,0" >
                                <Border.Background>
                                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                </Border.Background>
                            </Border>

                            <ContentControl x:Name="HeaderTopSelected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            <Border x:Name="DisabledVisualTopSelected" BorderThickness="1,1,1,0" BorderBrush="{StaticResource DisabledBorderBrush}" Margin="-1,-2,-1,0" Opacity="0" />

                        </Grid>
                        <Grid x:Name="TemplateTopUnselected" Visibility="Collapsed">

                            <Border x:Name="TopUnselected" BorderThickness="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
                                <Border x:Name="InnerBorder" BorderThickness="1,1,1,0" BorderBrush="{StaticResource InnerBorderBrush}" />
                            </Border>
                            <Border x:Name="TopMouseOverBorder" BorderThickness="1,1,1,0" Opacity="0" Background="{StaticResource MouseOverBrush}" BorderBrush="{StaticResource MouseOverBorderBrush}" Margin="0,0,0,1" >
                                <Border x:Name="TopMouseOverInnerBorder" BorderThickness="1,1,1,0" BorderBrush="{StaticResource MouseOverInnerBorderBrush}" />
                            </Border>
                            <ContentControl x:Name="HeaderTopUnselected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>


                            <Border x:Name="DisabledVisualTopUnSelected" Background="{StaticResource DisabledBackgroundBrush}" BorderThickness="1,1,1,0" Margin="0,0,0,1" BorderBrush="{StaticResource DisabledBorderBrush}" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <Grid x:Name="TemplateBottomSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                            <Border x:Name="BottomSelected" BorderThickness="1,0,1,1" BorderBrush="{TemplateBinding BorderBrush}" Margin="-1,0,-1,-2" >
                                <Border.Background>
                                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                </Border.Background>
                            </Border>
                            <ContentControl x:Name="HeaderBottomSelected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            <Border x:Name="DisabledVisualBottomSelected" BorderThickness="1,0,1,1" BorderBrush="{StaticResource DisabledBorderBrush}" Margin="-1,0,-1,-2" Opacity="0" />
                        </Grid>
                        <Grid x:Name="TemplateBottomUnselected" Visibility="Collapsed">
                            <Border x:Name="BottomUnselected" BorderThickness="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
                                <Border x:Name="BottomInnerBorder" BorderThickness="1,0,1,1" BorderBrush="{StaticResource InnerBorderBrush}" />
                            </Border>
                            <Border x:Name="BottomMouseOverBorder" BorderThickness="1,0,1,1" Opacity="0" Background="{StaticResource MouseOverBrush}" BorderBrush="{StaticResource MouseOverBorderBrush}" Margin="0,1,0,0" >
                                <Border x:Name="BottomMouseOverInnerBorder" BorderThickness="1,0,1,1" BorderBrush="{StaticResource MouseOverInnerBorderBrush}" />
                            </Border>
                            <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 x:Name="DisabledVisualBottomUnSelected" Background="{StaticResource DisabledBackgroundBrush}" BorderThickness="1,0,1,1" Margin="0,1,0,0" BorderBrush="{StaticResource DisabledBorderBrush}" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <Grid x:Name="TemplateLeftSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                            <Border x:Name="LeftSelected" BorderThickness="1,1,0,1" BorderBrush="{TemplateBinding BorderBrush}" Margin="-2,-1,0,-1" >
                                <Border.Background>
                                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                </Border.Background>
                            </Border>

                            <ContentControl x:Name="HeaderLeftSelected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            <Border x:Name="DisabledVisualLeftSelected" BorderThickness="1,1,0,1" BorderBrush="{StaticResource DisabledBorderBrush}" Margin="-2,-1,0,-1" Opacity="0" />
                        </Grid>
                        <Grid x:Name="TemplateLeftUnselected" Visibility="Collapsed">

                            <Border x:Name="LeftUnselected" BorderThickness="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
                                <Border x:Name="LeftInnerBorder" BorderThickness="1,1,0,1" BorderBrush="{StaticResource InnerBorderBrush}" />
                            </Border>
                            <Border x:Name="LeftMouseOverBorder" BorderThickness="1,1,0,1" Opacity="0" Background="{StaticResource MouseOverBrush}" BorderBrush="{StaticResource MouseOverBorderBrush}" Margin="0,0,1,0" >
                                <Border x:Name="LeftMouseOverInnerBorder" BorderThickness="1,1,0,1" BorderBrush="{StaticResource MouseOverInnerBorderBrush}" />
                            </Border>
                            <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 x:Name="DisabledVisualLeftUnSelected" Background="{StaticResource DisabledBackgroundBrush}" BorderThickness="1,1,0,1" Margin="0,0,1,0" BorderBrush="{StaticResource DisabledBorderBrush}" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <Grid x:Name="TemplateRightSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                            <Border x:Name="RightSelected" BorderThickness="0,1,1,1" BorderBrush="{TemplateBinding BorderBrush}" Margin="0,-2,-2,-1" >
                                <Border.Background>
                                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                </Border.Background>
                            </Border>
                            <ContentControl x:Name="HeaderRightSelected" Cursor="{TemplateBinding Cursor}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
                            <Border x:Name="DisabledVisualRightSelected" BorderThickness="0,1,1,1" BorderBrush="{StaticResource DisabledBorderBrush}" Margin="0,-2,-2,-1" Opacity="0" />
                        </Grid>
                        <Grid x:Name="TemplateRightUnselected" Visibility="Collapsed">
                            <Border x:Name="RightUnselected" BorderThickness="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
                                <Border x:Name="RightInnerBorder" BorderThickness="0,1,1,1" BorderBrush="{StaticResource InnerBorderBrush}" />
                            </Border>
                            <Border x:Name="RightMouseOverBorder" BorderThickness="0,1,1,1" Opacity="0" Background="{StaticResource MouseOverBrush}" BorderBrush="{StaticResource MouseOverBorderBrush}" Margin="1,0,0,0" >
                                <Border x:Name="RightMouseOverInnerBorder" BorderThickness="0,1,1,1" BorderBrush="{StaticResource MouseOverInnerBorderBrush}" />
                            </Border>
                            <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 x:Name="DisabledVisualRightUnSelected" Background="{StaticResource DisabledBackgroundBrush}" BorderThickness="1,1,1,0" Margin="0,0,0,1" BorderBrush="{StaticResource DisabledBorderBrush}" IsHitTestVisible="false" Opacity="0"/>
                        </Grid>
                        <Border x:Name="FocusVisualElement" BorderBrush="#FF6DBDD1" BorderThickness="1" CornerRadius="3,3,0,0" IsHitTestVisible="false" Margin="-1" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
      
    </Style>

    <!---TreeView Style-->
    <Style TargetType="controls:TreeView" x:Key="DefaultTreeViewStyle">
        <Setter Property="Background" Value="{StaticResource ControlBackgroundBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
        <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">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Validation">
                                            <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 BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Border Background="{TemplateBinding Background}" Margin="1" 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="#FFDB000C" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" 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="#FFDC000C" Margin="-1,3,0,0"/>
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#FFFFFFFF" 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="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
        <Setter Property="FontSize" Value="13"/>
        <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">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Header">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="#FF999999"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedInactive">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To=".2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedBorder"/>

                                    </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>
                        <Border x:Name="SelectedBorder" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemSelectedBorderBrush}" Opacity="0" Background="{StaticResource ListItemSelectedBrush}" Grid.ColumnSpan="2" Grid.Column="1" >
                            <Border BorderBrush="{StaticResource ListItemSelectedInnerBorderBrush}" BorderThickness="1"/>
                        </Border>
                        <Button x:Name="Header" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Cursor="{TemplateBinding Cursor}" ClickMode="Hover" Foreground="{TemplateBinding Foreground}" IsTabStop="False" TabNavigation="Once" Grid.ColumnSpan="2" Grid.Column="1">
                            <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 BeginTime="00:00:00" Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Content"/>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Border x:Name="MouseOverBorder" CornerRadius="2,2,2,2" BorderThickness="1,1,1,1" BorderBrush="{StaticResource ListItemMouseOverBorderBrush}" Opacity="0" Background="{StaticResource ListItemMouseOverBrush}" >
                                            <Border BorderThickness="1" CornerRadius="1">
                                                <Border.BorderBrush>
                                                    <SolidColorBrush Color="{StaticResource WhiteColor}"/>
                                                </Border.BorderBrush>
                                            </Border>
                                        </Border>
                                        <ContentPresenter x:Name="Content" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}"/>
                                    </Grid>
                                </ControlTemplate>
                            </Button.Template>
                            <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}"/>
                        </Button>
                        <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>
                                                        <ColorAnimation Duration="0" To="#FF1BBBFA" Storyboard.TargetProperty="(Path.Stroke).Color" Storyboard.TargetName="UncheckedVisual"/>
                                                    </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="Opacity" Storyboard.TargetName="UncheckedVisual"/>
                                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedVisual"/>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                        </VisualStateManager.VisualStateGroups>
                                        <Grid HorizontalAlignment="Right" Margin="2 2 5 2">
                                            <Path x:Name="UncheckedVisual" Data="M 0,0 L 0,9 L 5,4.5 Z" Fill="#FFFFFFFF" HorizontalAlignment="Right" Height="9" Stroke="#FF989898" StrokeThickness="1" StrokeLineJoin="Miter" VerticalAlignment="Center" Width="6"/>
                                            <Path x:Name="CheckedVisual" Data="M 6,0 L 6,6 L 0,6 Z" Fill="#FF262626" HorizontalAlignment="Center" Height="6" Opacity="0" StrokeLineJoin="Miter" VerticalAlignment="Center" Width="6"/>
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </ToggleButton.Template>
                        </ToggleButton>
                        <Border x:Name="Validation" BorderBrush="#FFDB000C" 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="#FFDC000C" Margin="-1,3,0,0"/>
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#FFFFFFFF" 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>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
    </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