<!-- 
// Copyright © Microsoft Corporation.
// This source is subject to the Microsoft Source License for Silverlight Controls (March 2008 Release).
// Please see http://go.microsoft.com/fwlink/?LinkID=111693 for details. 
// All other rights reserved.
-->
 
<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Extended">

    <!--Calendar--> 
    <Style TargetType="local:Calendar">
        <!-- Calendar Properties -->
        <Setter Property="Template"> 
            <Setter.Value> 
                <!-- Start: Calendar control template-->
                <ControlTemplate TargetType="local:Calendar"> 
                    <!-- Start: Calendar parent canvas -->
                    <Canvas Name="RootElement">
                        <Canvas.Resources> 

                            <!-- Start: Calendar content control section -->
 
                            <ControlTemplate x:Key="MonthTemplate"> 
                                <!-- Start: Background Grid and UI for entire calendar -->
                                <Grid Name="BackgroundGrid"> 
                                    <Grid.Resources>
                                        <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF" />
                                        <!-- General calendar storyboards --> 
                                        <Storyboard x:Key="Normal State"/>
                                        <Storyboard x:Key="Disabled State">
                                            <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="DisabledGrid" Storyboard.TargetProperty="Opacity" To="1"/> 
                                        </Storyboard> 
                                    </Grid.Resources>
                                    <Grid.RowDefinitions> 
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions> 
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <!-- Start: Background UI --> 
                                    <Rectangle Stretch="Fill" Stroke="#FF000000" StrokeThickness="1" RadiusX="2" RadiusY="2"> 
                                        <Rectangle.Fill>
                                            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,0.7"> 
                                                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                <GradientStop Color="#FFFFFFFF" Offset="0.23"/>
                                                <GradientStop Color="#FFEFF6FB" Offset="0.23"/> 
                                                <GradientStop Color="#FFDDE6F2" Offset="0.6"/>
                                                <GradientStop Color="#FFD9E2EE" Offset="0.8"/>
                                                <GradientStop Color="#FFCFD9E6" Offset="1"/> 
                                            </LinearGradientBrush> 
                                        </Rectangle.Fill>
                                    </Rectangle> 
                                    <Rectangle Margin="1" Stretch="Fill" Stroke="#FFFFFFFF" StrokeThickness="1.5" RadiusX="1.5" RadiusY="1.5"/>
                                    <Grid Margin="1.5">
                                        <Grid.RowDefinitions> 
                                            <RowDefinition Height="3.65*"/>
                                            <RowDefinition Height=".35*"/>
                                            <RowDefinition Height="4*"/> 
                                            <RowDefinition Height="2*"/> 
                                        </Grid.RowDefinitions>
                                        <Rectangle Height=".5" Grid.Row="0" Fill="#FFFFFFFF" Margin="0,-14,0,0"/> 
                                    </Grid>
                                    <!-- End: Background Grid and UI for entire calendar -->
 
                                    <!-- Start: Outermost Content Grid -->
                                    <Grid x:Name="RootGrid">
                                        <Grid.RowDefinitions> 
                                            <RowDefinition Height="30"/> 
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions> 
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/> 
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
 
                                        <Grid.Resources> 
                                            <!---->
 
                                            <!-- Start: Previous button template -->
                                            <ControlTemplate x:Key="PreviousButtonTemplate" TargetType="Button">
                                                <Grid x:Name="RootElement" Margin="0" Cursor="Hand"> 
                                                    <Grid.Resources>
                                                        <!-- Visual constants used by the template -->
                                                        <Color x:Key="DefaultColor">#FF000000</Color> 
                                                        <Color x:Key="Hover">#FF557E9A</Color> 
                                                        <SolidColorBrush x:Key="HoverColor" Color="#FF9BAEBC" />
                                                        <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF" /> 
                                                        <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                                                        <LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1">
                                                            <GradientStop Color="#B2FFFFFF" Offset="0" /> 
                                                            <GradientStop Color="#51FFFFFF" Offset="1" />
                                                            <GradientStop Color="#66FFFFFF" Offset="0.325" />
                                                            <GradientStop Color="#1EFFFFFF" Offset="0.325" /> 
                                                        </LinearGradientBrush> 

                                                        <!-- Visual states for the template --> 
                                                        <Storyboard x:Key="Normal State">
                                                        <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Opacity" To="1" />
                                                        </Storyboard> 
                                                        <Storyboard x:Key="MouseOver State">
                                                            <ColorAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Color" To="{StaticResource Hover}" />
                                                        </Storyboard> 
                                                        <Storyboard x:Key="Pressed State"> 
                                                            <ColorAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Color" To="{StaticResource Hover}" />
                                                        </Storyboard> 
                                                        <Storyboard x:Key="Disabled State">
                                                            <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Opacity" To=".5" />
                                                        </Storyboard> 
                                                    </Grid.Resources>

                                                    <Grid> 
                                                        <Grid x:Name="FocusVisualElement" Visibility="Collapsed"> 
                                                            <Rectangle RadiusX="3" RadiusY="3" Margin="2" Stroke="{StaticResource AccentBrush}" StrokeThickness="1" />
                                                            <Rectangle RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="2" /> 
                                                            <Rectangle RadiusX="3" RadiusY="3" Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="2" />
                                                        </Grid>
                                                        <Grid Margin="14,5.25,15,4.25"> 
                                                            <Path Stretch="Fill" RenderTransformOrigin="0.5,0.5" Data="M2.5400503,-2.4606738 L2.5400503,7.5014123 7.5606006,2.4808186 z">
                                                                <Path.RenderTransform>
                                                                    <TransformGroup> 
                                                                        <ScaleTransform ScaleX="1" ScaleY="1"/> 
                                                                        <SkewTransform AngleX="0" AngleY="0"/>
                                                                        <RotateTransform Angle="-180"/> 
                                                                        <TranslateTransform X="0" Y="0"/>
                                                                    </TransformGroup>
                                                                </Path.RenderTransform> 
                                                                <Path.Fill>
                                                                    <SolidColorBrush x:Name="TextColor" Color="{StaticResource DefaultColor}" />
                                                                </Path.Fill> 
                                                            </Path> 
                                                        </Grid>
                                                    </Grid> 
                                                </Grid>
                                            </ControlTemplate>
                                            <!-- End: Previous button template --> 

                                            <!-- Start: Next button template -->
                                            <ControlTemplate x:Key="NextButtonTemplate" TargetType="Button"> 
                                                <Grid x:Name="RootElement" Margin="0" Cursor="Hand"> 
                                                    <Grid.Resources>
                                                        <!-- Visual constants used by the template --> 
                                                        <Color x:Key="DefaultColor">#FF000000</Color>
                                                        <Color x:Key="Hover">#FF557E9A</Color>
                                                        <SolidColorBrush x:Key="HoverColor" Color="#FF9BAEBC" /> 
                                                        <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF" />
                                                        <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                                                        <LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1"> 
                                                            <GradientStop Color="#B2FFFFFF" Offset="0" /> 
                                                            <GradientStop Color="#51FFFFFF" Offset="1" />
                                                            <GradientStop Color="#66FFFFFF" Offset="0.325" /> 
                                                            <GradientStop Color="#1EFFFFFF" Offset="0.325" />
                                                        </LinearGradientBrush>
 
                                                        <!-- Visual states for the template -->
                                                        <Storyboard x:Key="Normal State">
                                                        <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Opacity" To="1" /> 
                                                         </Storyboard> 
                                                        <Storyboard x:Key="MouseOver State">
                                                            <ColorAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Color" To="{StaticResource Hover}" /> 
                                                        </Storyboard>
                                                        <Storyboard x:Key="Pressed State">
                                                            <ColorAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Color" To="{StaticResource Hover}" /> 
                                                        </Storyboard>
                                                        <Storyboard x:Key="Disabled State">
                                                            <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Opacity" To=".5" /> 
                                                        </Storyboard> 
                                                    </Grid.Resources>
 
                                                    <Grid>
                                                        <Grid x:Name="FocusVisualElement" Visibility="Collapsed">
                                                            <Rectangle RadiusX="3" RadiusY="3" Margin="2" Stroke="{StaticResource AccentBrush}" StrokeThickness="1" /> 
                                                            <Rectangle RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="2" />
                                                            <Rectangle RadiusX="3" RadiusY="3" Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="2" />
                                                        </Grid> 
                                                        <Grid Margin="15,5.25,14,4.25"> 
                                                            <Path Stretch="Fill" Data="M2.5400503,-2.4606738 L2.5400503,7.5014123 7.5606006,2.4808186 z">
                                                                <Path.Fill> 
                                                                    <SolidColorBrush x:Name="TextColor" Color="{StaticResource DefaultColor}" />
                                                                </Path.Fill>
                                                            </Path> 
                                                        </Grid>
                                                    </Grid>
                                                </Grid> 
                                            </ControlTemplate> 
                                            <!-- End: Next button template -->
 
                                            <!-- Start: Header button template -->
                                            <ControlTemplate x:Key="HeaderButtonTemplate" TargetType="Button">
                                                <Grid x:Name="RootElement" Margin="0"> 
                                                    <Grid.Resources>
                                                        <!-- Visual constants used by the template -->
                                                        <Color x:Key="DefaultColor">#FF000000</Color> 
                                                        <Color x:Key="Hover">#FF557E9A</Color> 
                                                        <SolidColorBrush x:Key="HoverColor" Color="#FF9BAEBC" />
                                                        <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF" /> 
                                                        <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                                                        <LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1">
                                                            <GradientStop Color="#B2FFFFFF" Offset="0" /> 
                                                            <GradientStop Color="#51FFFFFF" Offset="1" />
                                                            <GradientStop Color="#66FFFFFF" Offset="0.325" />
                                                            <GradientStop Color="#1EFFFFFF" Offset="0.325" /> 
                                                        </LinearGradientBrush> 

                                                        <!-- Visual states for the template --> 
                                                        <Storyboard x:Key="Normal State">
                                                            <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="buttonContent" Storyboard.TargetProperty="Opacity" To="1" />
                                                        </Storyboard> 
                                                        <Storyboard x:Key="MouseOver State">
                                                            <ColorAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Color" To="{StaticResource Hover}" />
                                                        </Storyboard> 
                                                        <Storyboard x:Key="Pressed State"> 
                                                            <ColorAnimation Duration="0:0:0" Storyboard.TargetName="TextColor" Storyboard.TargetProperty="Color" To="{StaticResource Hover}" />
                                                        </Storyboard> 
                                                        <Storyboard x:Key="Disabled State">
                                                            <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="buttonContent" Storyboard.TargetProperty="Opacity" To=".4" />
                                                        </Storyboard> 
                                                    </Grid.Resources>

                                                    <Grid x:Name="FocusVisualElement" Visibility="Collapsed"> 
                                                        <Rectangle RadiusX="3" RadiusY="3" Margin="2" Stroke="{StaticResource AccentBrush}" StrokeThickness="1" /> 
                                                        <Rectangle RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="2" />
                                                        <Rectangle RadiusX="3" RadiusY="3" Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="2" /> 
                                                    </Grid>
                                                    <ContentPresenter
                                                      x:Name="buttonContent" 
                                                      Content="{TemplateBinding Content}"
                                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                                      FontFamily="{TemplateBinding FontFamily}" 
                                                      FontSize="{TemplateBinding FontSize}" 
                                                      FontStretch="{TemplateBinding FontStretch}"
                                                      FontStyle="{TemplateBinding FontStyle}" 
                                                      FontWeight="{TemplateBinding FontWeight}"
                                                      HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                      Padding="{TemplateBinding Padding}" 
                                                      TextAlignment="{TemplateBinding TextAlignment}"
                                                      TextDecorations="{TemplateBinding TextDecorations}"
                                                      TextWrapping="{TemplateBinding TextWrapping}" 
                                                      VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" 
                                                      Margin="1,2,1,1"
                                                      RenderTransformOrigin="0.5,0.5" 
                                                      Cursor="Hand">
                                                        <ContentPresenter.Foreground>
                                                            <SolidColorBrush x:Name="TextColor" Color="{StaticResource DefaultColor}"/> 
                                                        </ContentPresenter.Foreground>
                                                    </ContentPresenter>
                                                </Grid> 
                                            </ControlTemplate> 
                                            <!-- End: Header button template -->
 
                                            <!-- Start: Data template for header button -->
                                            <DataTemplate x:Name="DayTitleTemplate">
                                                <TextBlock 
                                                Height="20"
                                                FontWeight="Bold"
                                                FontFamily="Trebuchet MS" 
                                                FontSize="10.5" 
                                                Foreground="#FF313131"
                                                HorizontalAlignment="Center" 
                                                VerticalAlignment="Center"
                                                Margin="0,-2,0,0"/>
                                            </DataTemplate> 
                                            <!-- End: Data template for header button -->
                                        </Grid.Resources>
 
                                        <!-- Start: Previous button content --> 
                                        <Button x:Name="PreviousButtonElement" Height="20" Width="34" Template="{StaticResource PreviousButtonTemplate}" Grid.Column="0" Grid.Row="0" Visibility="Collapsed">
                                        </Button> 
                                        <!-- End: Previous button content -->

                                        <!-- Start: Header button content --> 
                                        <!-- Relies on button defaults right now - needs to be unique though -->
                                        <Button x:Name="HeaderButtonElement" FontSize="11" Height="20" Width="100" HorizontalAlignment="Center" VerticalAlignment="Center"  Template="{StaticResource HeaderButtonTemplate}" Grid.Column="1" Grid.Row="0"/>
                                        <!-- End: Header button content --> 
 
                                        <!-- Start: Next button content -->
                                        <Button x:Name="NextButtonElement" Height="20" Width="34" Template="{StaticResource NextButtonTemplate}" Grid.Column="2" Grid.Row="0" Visibility="Collapsed" /> 
                                        <!-- End: Next button content -->

                                        <!-- Start: Month Content Grid --> 
                                        <Grid x:Name="MonthGrid" Grid.Row="1" Grid.ColumnSpan="3" Visibility="Collapsed" Margin="10,12,10,7" RenderTransformOrigin="0.5,0.5">
                                            <!-- Using the * makes the content fill the available space -->
                                            <!-- Using Auto makes the content remain at the specified size --> 
                                            <Grid.RowDefinitions> 
                                                <RowDefinition Height="14"/>
                                                <RowDefinition Height="Auto"/> 
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="Auto"/> 
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions> 
                                            <Grid.ColumnDefinitions> 
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/> 
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/> 
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/>
                                            </Grid.ColumnDefinitions> 
                                        </Grid> 
                                        <!-- End: Month Content Grid -->
 
                                        <!-- End: Year Content Grid -->
                                        <Grid x:Name="YearViewGrid" Grid.Row="1" Grid.ColumnSpan="3" Visibility="Collapsed" Margin="10,8.5,10,10.5" RenderTransformOrigin="0.5,0.5">
                                            <!-- Using the * makes the content fill the available space --> 
                                            <!-- Using Auto makes the content remain at the specified size -->
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/> 
                                                <RowDefinition Height="Auto"/> 
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions> 
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/> 
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/>
                                            </Grid.ColumnDefinitions> 
                                        </Grid> 
                                        <!-- End: Year Content Grid -->
                                    </Grid> 
                                    <!-- End: Outermost Content Grid -->
                                    <Grid x:Name="DisabledGrid" Opacity="0" Visibility="Collapsed">
                                        <Rectangle Stretch="Fill" StrokeThickness="1" RadiusX="2" RadiusY="2" Stroke="{StaticResource DisabledColor}" Fill="{StaticResource DisabledColor}"/> 
                                    </Grid>
                                </Grid>
                                <!-- End: Background Grid and UI for entire calendar --> 
                            </ControlTemplate> 
                            <!-- End: Calendar content control section -->
 
                        </Canvas.Resources>
                    </Canvas>
                    <!-- End: Calendar parent canvas --> 
                </ControlTemplate>
                <!-- End: Calendar control template-->
            </Setter.Value> 
        </Setter> 
    </Style>
 
    <!--Day Button-->
    <Style TargetType="local:DayButton">
        <!-- Date button properties --> 
        <Setter Property="IsEnabled" Value="true"/>
        <Setter Property="IsTabStop" Value="true"/>
        <Setter Property="Background" Value="#FF003255"/> 
        <Setter Property="Foreground" Value="#FF313131"/> 
        <Setter Property="MinWidth" Value="23"/>
        <Setter Property="MinHeight" Value="9"/> 
        <Setter Property="Margin" Value="1,.5,1,.5"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/> 
        <Setter Property="Cursor" Value="Arrow"/>
        <Setter Property="TextAlignment" Value="Left"/>
        <Setter Property="TextWrapping" Value="NoWrap"/> 
        <Setter Property="FontFamily" Value="Trebuchet MS"/> 
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="Template"> 
            <Setter.Value>
                <ControlTemplate TargetType="local:DayButton">
                    <Grid x:Name="RootElement"> 
                        <Grid.Resources>
                            <!-- Visual constants used by the template -->
                            <SolidColorBrush x:Key="Background" Color="#FF4D6E84" /> 
                            <SolidColorBrush x:Key="FontHightlightColor" Color="#FFFFFFFF"/> 
                            <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                            <LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1"> 
                                <GradientStop Color="#B2FFFFFF" Offset="0" />
                                <GradientStop Color="#51FFFFFF" Offset="1" />
                                <GradientStop Color="#66FFFFFF" Offset="0.325" /> 
                                <GradientStop Color="#1EFFFFFF" Offset="0.325" />
                            </LinearGradientBrush>
 
                            <!-- Visual states of the template --> 
                            <Storyboard x:Key="Normal State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="0" />
                            </Storyboard> 
                            <Storyboard x:Key="Normal Selected State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".3" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="0" /> 
                            </Storyboard>
                            <Storyboard x:Key="Normal Selected Today State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".5" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="1" /> 
                            </Storyboard>
                            <Storyboard x:Key="Normal Inactive Selected State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".3" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".5" />
                            </Storyboard> 
                            <Storyboard x:Key="Normal Inactive Selected Today State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".5" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".5" />
                            </Storyboard>
                            <Storyboard x:Key="Normal Inactive State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".65" /> 
                            </Storyboard>
                            <Storyboard x:Key="Normal Today State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".6" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="1" />
                            </Storyboard> 
                            <Storyboard x:Key="Normal Inactive Today State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".6" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".65" />
                            </Storyboard>
                            <Storyboard x:Key="MouseOver State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="0" /> 
                            </Storyboard> 
                            <Storyboard x:Key="MouseOver Inactive State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".5" />
                            </Storyboard> 
                            <Storyboard x:Key="MouseOver Selected State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="0" /> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To=".65" />
                            </Storyboard> 
                            <Storyboard x:Key="MouseOver Today State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".4" /> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="1" />
                            </Storyboard>
                            <Storyboard x:Key="MouseOver Inactive Selected State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".5" /> 
                            </Storyboard>
                            <Storyboard x:Key="MouseOver Selected Today State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".4" />
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To=".75" /> 
                            </Storyboard> 
                            <Storyboard x:Key="MouseOver Inactive Today State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".4" />
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".5" />
                            </Storyboard> 
                            <Storyboard x:Key="Pressed State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="0" /> 
                            </Storyboard>
                            <Storyboard x:Key="Pressed Inactive State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".5" /> 
                            </Storyboard>
                            <Storyboard x:Key="Pressed Selected State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To=".65" /> 
                            </Storyboard>
                            <Storyboard x:Key="Pressed Today State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".4" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="1" />
                            </Storyboard> 
                            <Storyboard x:Key="Pressed Inactive Selected"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".5" />
                            </Storyboard>
                            <Storyboard x:Key="Pressed Selected Today"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".4" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To=".75" /> 
                            </Storyboard>
                            <Storyboard x:Key="Pressed Inactive Today"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".4" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".7" /> 
                            </Storyboard>
                            <Storyboard x:Key="Disabled State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To=".5" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="0" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="0" />
                            </Storyboard> 
                            <Storyboard x:Key="Disabled Today State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To=".5" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".6" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To="0" />
                            </Storyboard>
                            <Storyboard x:Key="Disabled Inactive State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="0" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".4" /> 
                            </Storyboard>
                            <Storyboard x:Key="Disabled Inactive Today State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To="1" /> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".6" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="InactiveText" Storyboard.TargetProperty="Opacity" To=".4" />
                            </Storyboard> 
                        </Grid.Resources> 

                        <Rectangle x:Name="Background" Opacity="0"  RadiusX="4" RadiusY="4" Fill="{StaticResource Background}"/> 
                        <ContentPresenter
                            x:Name="NormalText"
                            Content="{TemplateBinding Content}" 
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}" 
                            FontStretch="{TemplateBinding FontStretch}" 
                            FontStyle="{TemplateBinding FontStyle}"
                            FontWeight="{TemplateBinding FontWeight}" 
                            Foreground="{TemplateBinding Foreground}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}" 
                            TextAlignment="{TemplateBinding TextAlignment}"
                            TextDecorations="{TemplateBinding TextDecorations}"
                            TextWrapping="{TemplateBinding TextWrapping}" 
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" 
                            Margin="1,2,1,1" />
                        <ContentPresenter 
                            x:Name="InactiveText"
                            Opacity="0"
                            Content="{TemplateBinding Content}" 
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}" 
                            FontStretch="{TemplateBinding FontStretch}" 
                            FontStyle="{TemplateBinding FontStyle}"
                            FontWeight="{TemplateBinding FontWeight}" 
                            Foreground="{StaticResource FontHightlightColor}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}" 
                            TextAlignment="{TemplateBinding TextAlignment}"
                            TextDecorations="{TemplateBinding TextDecorations}"
                            TextWrapping="{TemplateBinding TextWrapping}" 
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" 
                            Margin="1,2,1,1"
                            IsHitTestVisible="false"/> 
                        <Grid x:Name="FocusVisualElement" Visibility="Collapsed" IsHitTestVisible="false">
                            <Rectangle RadiusX="3" RadiusY="3" Margin="1" Stroke="{StaticResource AccentBrush}" StrokeThickness=".5" IsHitTestVisible="false"/>
                            <Rectangle RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="1" IsHitTestVisible="false"/> 
                            <Rectangle RadiusX="3" RadiusY="3" Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="1" IsHitTestVisible="false"/>
                        </Grid>
                    </Grid> 
                </ControlTemplate> 
            </Setter.Value>
        </Setter> 
    </Style>

 
    <!--Month Button-->
    <Style TargetType="local:MonthButton">
        <!-- Any other properties you want to set --> 
        <Setter Property="IsEnabled" Value="true"/> 
        <Setter Property="IsTabStop" Value="true"/>
        <Setter Property="Background" Value="#FF003255"/> 
        <Setter Property="Foreground" Value="#FF313131"/>
        <Setter Property="MinWidth" Value="41.75"/>
        <Setter Property="MinHeight" Value="41.4"/> 
        <Setter Property="Margin" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/> 
        <Setter Property="Cursor" Value="Arrow"/> 
        <Setter Property="TextAlignment" Value="Left"/>
        <Setter Property="TextWrapping" Value="NoWrap"/> 
        <Setter Property="FontFamily" Value="Trebuchet MS"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="Template"> 
            <Setter.Value>
                <ControlTemplate TargetType="local:MonthButton">
                    <Grid x:Name="RootElement"> 
                        <Grid.Resources> 
                            <!-- Visual constants used by the template -->
                            <Color x:Key="NormalToday">#FF6F8B9E</Color> 
                            <Color x:Key="HoverToday">#FF9BAEBC</Color>
                            <Color x:Key="SelectedToday">#FF859CAD</Color>
                            <Color x:Key="HoverNormal">#FFC6D0D9</Color> 
                            <SolidColorBrush x:Key="FontHightlightColor" Color="#FFFFFFFF"/>
                            <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                            <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" /> 
                            <LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1"> 
                                <GradientStop Color="#B2FFFFFF" Offset="0" />
                                <GradientStop Color="#51FFFFFF" Offset="1" /> 
                                <GradientStop Color="#66FFFFFF" Offset="0.325" />
                                <GradientStop Color="#1EFFFFFF" Offset="0.325" />
                            </LinearGradientBrush> 

                            <!-- Visual states of the template -->
                            <Storyboard x:Key="Normal State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="0" /> 
                            </Storyboard>
                            <Storyboard x:Key="Normal Selected State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".2" />
                            </Storyboard>
                            <Storyboard x:Key="MouseOver State"> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".1" />
                            </Storyboard>
                            <Storyboard x:Key="MouseOver Selected State"> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".1" /> 
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To=".65" />
                            </Storyboard> 
                            <Storyboard x:Key="Pressed State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".1" />
                            </Storyboard> 
                            <Storyboard x:Key="Pressed Selected State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".1" />
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To=".65" /> 
                            </Storyboard> 
                        </Grid.Resources>
 
                        <Rectangle x:Name="Background" Opacity="0"  RadiusX="4" RadiusY="4" Fill="{TemplateBinding Background}" />
                        <ContentPresenter
                            Content="{TemplateBinding Content}" 
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontSize="{TemplateBinding FontSize}" 
                            FontStretch="{TemplateBinding FontStretch}" 
                            FontStyle="{TemplateBinding FontStyle}"
                            FontWeight="{TemplateBinding FontWeight}" 
                            Foreground="{TemplateBinding Foreground}"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}" 
                            TextAlignment="{TemplateBinding TextAlignment}"
                            TextDecorations="{TemplateBinding TextDecorations}"
                            TextWrapping="{TemplateBinding TextWrapping}" 
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" 
                            Margin="1,2,1,1" />
                        <Rectangle x:Name="Disabled" RadiusX="4" RadiusY="4" Fill="{StaticResource DisabledBrush}" Opacity="0" /> 
                        <Grid x:Name="FocusVisualElement" Visibility="Collapsed">
                            <Rectangle RadiusX="3" RadiusY="3" Margin="2" Stroke="{StaticResource AccentBrush}" StrokeThickness=".5" />
                            <Rectangle RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="1" /> 
                            <Rectangle RadiusX="3" RadiusY="3" Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="1" />
                        </Grid>
                    </Grid> 
                </ControlTemplate> 
            </Setter.Value>
        </Setter> 
    </Style>

 
    <!--DatePicker-->
    <Style TargetType="local:DatePicker">
        <!-- DatePicker properties --> 
        <Setter Property="Template"> 
            <Setter.Value>
                <ControlTemplate TargetType="local:DatePicker"> 
                    <Grid x:Name="RootElement">
                        <Grid.Resources>
                            <!-- Main DatePicker Brushes --> 
                            <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />

                            <!-- Start: Down button template --> 
                            <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="Button"> 
                                <Grid x:Name="RootElement">
                                    <Grid.Resources> 
                                        <!-- Visual constants used by the template -->
                                        <Color x:Key="BaseColor">#FF003255</Color>
                                        <Color x:Key="LinearBevelLightStartColor">#FCFFFFFF</Color> 
                                        <Color x:Key="LinearBevelLightEndColor">#F4FFFFFF</Color>
                                        <Color x:Key="LinearBevelDarkStartColor">#E0FFFFFF</Color>
                                        <Color x:Key="LinearBevelDarkEndColor">#B2FFFFFF</Color> 
                                        <Color x:Key="MouseOverLinearBevelDarkEndColor">#7FFFFFFF</Color> 
                                        <Color x:Key="HoverLinearBevelLightStartColor">#FCFFFFFF</Color>
                                        <Color x:Key="HoverLinearBevelLightEndColor">#EAFFFFFF</Color> 
                                        <Color x:Key="HoverLinearBevelDarkStartColor">#D8FFFFFF</Color>
                                        <Color x:Key="HoverLinearBevelDarkEndColor">#4CFFFFFF</Color>
                                        <Color x:Key="CurvedBevelFillStartColor">#B3FFFFFF</Color> 
                                        <Color x:Key="CurvedBevelFillEndColor">#3CFFFFFF</Color>
                                        <SolidColorBrush x:Key="BorderBrush" Color="#FF000000" />
                                        <SolidColorBrush x:Key="IconColor" Color="#FF000000" /> 
                                        <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" /> 
                                        <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
 
                                        <!-- Visual states of the template -->
                                        <Storyboard x:Key="Normal State" />
                                        <Storyboard x:Key="MouseOver State"> 
                                            <ColorAnimation Duration="0:0:0.2" Storyboard.TargetName="LinearBevelDarkEnd" Storyboard.TargetProperty="Color" To="{StaticResource MouseOverLinearBevelDarkEndColor}" />
                                        </Storyboard>
                                        <Storyboard x:Key="Pressed State"> 
                                            <DoubleAnimation Duration="0:0:0.1" Storyboard.TargetName="LinearBevelLightEnd" Storyboard.TargetProperty="Offset" To=".2" /> 
                                            <ColorAnimation Duration="0:0:0.1" Storyboard.TargetName="LinearBevelLightStart" Storyboard.TargetProperty="Color" To="{StaticResource HoverLinearBevelLightEndColor}" />
                                            <ColorAnimation Duration="0:0:0.1" Storyboard.TargetName="LinearBevelLightEnd" Storyboard.TargetProperty="Color" To="{StaticResource HoverLinearBevelLightEndColor}" /> 
                                            <ColorAnimation Duration="0:0:0.1" Storyboard.TargetName="LinearBevelDarkStart" Storyboard.TargetProperty="Color" To="{StaticResource HoverLinearBevelDarkStartColor}" />
                                            <ColorAnimation Duration="0:0:0.1" Storyboard.TargetName="LinearBevelDarkEnd" Storyboard.TargetProperty="Color" To="{StaticResource HoverLinearBevelDarkEndColor}" />
                                            <DoubleAnimation Duration="0:0:0.1" Storyboard.TargetName="DownStroke" Storyboard.TargetProperty="Opacity" To="1" /> 
                                            <DoubleAnimation Duration="0:0:0.1" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="0" />
                                        </Storyboard>
                                        <Storyboard x:Key="Disabled State"> 
                                            <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="Disabled" Storyboard.TargetProperty="Opacity" To="1" /> 
                                        </Storyboard>
                                    </Grid.Resources> 

                                    <Rectangle RadiusX="1" RadiusY="1" Margin="1,2,1.5,2" StrokeThickness="1">
                                        <Rectangle.Fill> 
                                            <LinearGradientBrush StartPoint="0.7,0" EndPoint="0.7,1">
                                                <GradientStop x:Name="LinearBevelLightStart" Color="{StaticResource LinearBevelLightStartColor}" Offset="0" />
                                                <GradientStop x:Name="LinearBevelLightEnd" Color="{StaticResource LinearBevelLightEndColor}" Offset="0.35" /> 
                                                <GradientStop x:Name="LinearBevelDarkStart" Color="{StaticResource LinearBevelDarkStartColor}" Offset="0.35" /> 
                                                <GradientStop x:Name="LinearBevelDarkEnd" Color="{StaticResource LinearBevelDarkEndColor}" Offset="1" />
                                            </LinearGradientBrush> 
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Grid x:Name="CurvedBevelScale" Margin="2"> 
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="7*" />
                                            <RowDefinition Height="3*" /> 
                                        </Grid.RowDefinitions> 
                                        <Path x:Name="CurvedBevel" Stretch="Fill" Margin="1.5,1,1.5,2" Data="F1 M0,0.02 L0,0.15 C0.15,0.22 0.3,0.25 0.5,0.25 0.7,0.25 0.85,0.22 1,0.15 L1,0.02 1,0 0.02,0 0,0.02 z">
                                            <Path.Fill> 
                                                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                                    <GradientStop x:Name="CurvedBevelFillStart" Color="{StaticResource CurvedBevelFillStartColor}" Offset="0" />
                                                    <GradientStop x:Name="CurvedBevelFillEnd" Color="{StaticResource CurvedBevelFillEndColor}" Offset="1" /> 
                                                </LinearGradientBrush>
                                            </Path.Fill>
                                        </Path> 
                                    </Grid> 
                                    <Grid x:Name="FocusVisualElement" Visibility="Collapsed">
                                        <!--empty because wtb will handle focus--> 
                                    </Grid>
                                    <Grid x:Name="DownStroke" Opacity="0">
                                        <Rectangle Stroke="{TemplateBinding Background}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="0.05" Margin="1.5,2.5,1.5,1.5" /> 
                                        <Rectangle Stroke="{TemplateBinding Background}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="0.05" Margin="1.5,2.25,1.5,1.5" />
                                        <Rectangle Stroke="{TemplateBinding Background}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="0.05" Margin="1.5,2,1.5,1.5" />
                                        <Rectangle Stroke="{TemplateBinding Background}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="0.05" Margin="1.5,1.75,1.5,1.5" /> 
                                        <Rectangle Stroke="{TemplateBinding Background}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="1" Margin="1" /> 
                                        <Rectangle RadiusX="1" RadiusY="1" StrokeThickness="1" Margin="1">
                                            <Rectangle.Stroke> 
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#A5FFFFFF" Offset="0" />
                                                    <GradientStop Color="#FFFFFFFF" Offset="1" /> 
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                        </Rectangle> 
                                    </Grid> 
                                    <Grid>
                                        <Path Width="12" Height="11" Stretch="Fill" Stroke="#FF313131" StrokeThickness=".7" Data="M1,2 C1,1.4477153 1.4477153,1 2,1 L56,1 C56.552285,1 57,1.4477153 57,2 L57,42.75 C57,43.302285 56.552285,43.75 56,43.75 L2,43.75 C1.4477153,43.75 1,43.302285 1,42.75 z M1.5,21 L57.25,21 M1.5,33 L57.25,33 M15,9.4479447 L15,42.75 M29.5,9.4479447 L29.5,42.75 M44,9.4479447 L44,42.75"/> 
                                        <Rectangle Width="12" Height="2.15" Fill="#FF313131" Stroke="#FF313131" StrokeThickness=".7" VerticalAlignment="Top" Margin="0,5.15,0,0"/>
                                    </Grid>
                                    <Rectangle x:Name="Disabled" RadiusX="2" RadiusY="2" Fill="{StaticResource DisabledBrush}" Opacity="0" /> 
                                </Grid>
                            </ControlTemplate>
 
                            <ControlTemplate x:Key="WatermarkedTextBoxTemplate"  TargetType="local:WatermarkedTextBox"> 
                                <Grid x:Name="RootElement" >
                                    <Grid.Resources> 
                                        <SolidColorBrush x:Key="Background" Color="#FF003255"/>
                                        <SolidColorBrush x:Key="TBBackgroundFill" Color="#FFFFFFFF"/>
                                        <SolidColorBrush x:Key="BorderBrush" Color="#FF000000"/> 
                                        <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF"/>
                                        <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF"/>
                                        <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA"/> 
                                        <LinearGradientBrush x:Key="FocusedStrokeBrush" StartPoint="0.5,0" EndPoint="0.5,1"> 
                                            <GradientStop Color="#B2FFFFFF" Offset="0"/>
                                            <GradientStop Color="#51FFFFFF" Offset="1"/> 
                                            <GradientStop Color="#66FFFFFF" Offset="0.325"/>
                                            <GradientStop Color="#1EFFFFFF" Offset="0.325"/>
                                        </LinearGradientBrush> 

                                        <Storyboard x:Name="Disabled State">
                                            <DoubleAnimation Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0"/> 
                                            <DoubleAnimation Storyboard.TargetName="ELEMENT_Content" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0:0:0.0"/> 
                                            <DoubleAnimation Storyboard.TargetName="WatermarkElement" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.0"/>
                                        </Storyboard> 
                                        <Storyboard x:Name="Disabled Watermarked State">
                                            <DoubleAnimation Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0"/>
                                            <DoubleAnimation Storyboard.TargetName="ELEMENT_Content" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.0"/> 
                                            <DoubleAnimation Storyboard.TargetName="WatermarkElement" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0:0:0.0"/>
                                        </Storyboard>
                                        <Storyboard x:Name="Normal State"> 
                                            <DoubleAnimation Storyboard.TargetName="ELEMENT_Content" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0"/> 
                                            <DoubleAnimation Storyboard.TargetName="WatermarkElement" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.0"/>
                                        </Storyboard> 
                                        <Storyboard x:Name="Focused State">
                                            <DoubleAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1"/>
                                            <DoubleAnimation Storyboard.TargetName="ELEMENT_Content" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0"/> 
                                            <DoubleAnimation Storyboard.TargetName="WatermarkElement" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.0"/>
                                        </Storyboard>
                                        <Storyboard x:Name="MouseOver State"> 
                                            <DoubleAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1"/> 
                                            <DoubleAnimation Storyboard.TargetName="ELEMENT_Content" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0"/>
                                            <DoubleAnimation Storyboard.TargetName="WatermarkElement" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.0"/> 
                                        </Storyboard>
                                        <Storyboard  x:Name="Normal Watermarked State">
                                            <DoubleAnimation Storyboard.TargetName="ELEMENT_Content" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.0"/> 
                                            <DoubleAnimation Storyboard.TargetName="WatermarkElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0"/>
                                        </Storyboard>
                                        <Storyboard x:Name="MouseOver Watermarked State"> 
                                            <DoubleAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1"/> 
                                            <DoubleAnimation Storyboard.TargetName="ELEMENT_Content" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.0"/>
                                            <DoubleAnimation Storyboard.TargetName="WatermarkElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0"/> 
                                        </Storyboard>
                                    </Grid.Resources>
 

                                    <Border Background="#FFFFFFFF" CornerRadius="2"/>
                                    <Grid x:Name="WatermarkContentElement" Margin="0"> 
                                        <Grid.ColumnDefinitions> 
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="21"/> 
                                        </Grid.ColumnDefinitions>
                                        <Border x:Name="ELEMENT_Content" Grid.ColumnSpan="2" Background="#FFFFFFFF" Padding="{TemplateBinding Padding}" Grid.Column="0" Margin="0"/>
                                        <ContentControl 
                                          x:Name="WatermarkElement"
                                          Grid.Column="0"
                                          IsTabStop="False" 
                                          IsHitTestVisible="False" 
                                          Content="{TemplateBinding Watermark}"
                                          Foreground="{StaticResource WatermarkBrush}" 
                                          Background="{StaticResource TBBackgroundFill}"
                                          FontFamily="{TemplateBinding FontFamily}"
                                          FontSize="{TemplateBinding FontSize}" 
                                          FontStretch="{TemplateBinding FontStretch}"
                                          FontStyle="{TemplateBinding FontStyle}"
                                          FontWeight="{TemplateBinding FontWeight}" 
                                          Padding="{TemplateBinding Padding}" 
                                          Margin="-1,-2,0,0"/>
                                        <Grid Grid.Column="1" Margin=".5"> 
                                            <Rectangle RadiusX="1" RadiusY="1" Fill="{StaticResource Background}" Margin="1.5" />
                                            <Rectangle RadiusX="1" RadiusY="1" StrokeThickness=".5" Stroke="{StaticResource BorderBrush}" />
                                            <Rectangle RadiusX=".5" RadiusY=".5" Margin="0,0,0,0"  Stroke="{StaticResource AccentBrush}" StrokeThickness="1" /> 
                                        </Grid>
                                    </Grid>
                                    <Border CornerRadius="2" BorderThickness="1" BorderBrush="#FF000000"/> 
                                    <Grid x:Name="DownStroke"> 
                                        <Rectangle Stroke="{StaticResource BorderBrush}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="0.025" Margin="1,1.75,1,1"/>
                                        <Rectangle Stroke="{StaticResource BorderBrush}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="0.025" Margin="1,1.5,1,1"/> 
                                        <Rectangle Stroke="{StaticResource BorderBrush}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="0.025" Margin="1,1.25,1,1"/>
                                        <Rectangle Stroke="{StaticResource BorderBrush}" RadiusX="1" RadiusY="1" StrokeThickness="1" Opacity="0.025" Margin="1,1,1,1"/>
                                    </Grid> 
                                    <Grid x:Name="FocusVisual" Opacity="0">
                                        <Rectangle RadiusX="1" RadiusY="1" Margin="2"  Stroke="{StaticResource AccentBrush}" StrokeThickness="1"/>
                                        <Rectangle RadiusX="1" RadiusY="1"  Stroke="{StaticResource Background}" StrokeThickness="2"/> 
                                        <Rectangle RadiusX="1" RadiusY="1"  Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="2"/> 
                                    </Grid>
                                </Grid> 
                            </ControlTemplate>

                            <Storyboard Name="Normal State"/> 
                            <Storyboard Name="Disabled State">
                                <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard> 
                        </Grid.Resources> 

                        <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions> 
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions> 
 
                        <local:WatermarkedTextBox x:Name="TextBoxElement" FontFamily="Trebuchet MS" FontSize="11" FontWeight="Normal" Template="{StaticResource WatermarkedTextBoxTemplate}" Width="{TemplateBinding Width}" Grid.Column="0" Padding="5,4,6,3"/>
                        <Button x:Name="ButtonElement" Template="{StaticResource DropDownButtonTemplate}" Grid.Column="1" Width="20.5" Margin="-21,0,0,0"/> 
                        <Rectangle x:Name="DisabledVisual" Grid.ColumnSpan="2" Fill="{StaticResource DisabledBrush}" Opacity="1" Visibility="Visible"/>
                    </Grid>
                </ControlTemplate> 

            </Setter.Value>
        </Setter> 
    </Style> 

 

    <Style TargetType="local:Slider">
        <!-- Any other properties you want to set --> 
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:Slider"> 
                    <Grid x:Name="RootElement"> 
                        <!-- States -->
                        <Grid.Resources> 
                            <!-- Transition to the slider's default state -->
                            <Storyboard x:Key="Normal State">
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Opacity" To="1" /> 
                            </Storyboard>

                            <!-- Transition to the slider's mouseover state --> 
                            <Storyboard x:Key="MouseOver State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Opacity" To="1" />
                            </Storyboard> 

                            <!-- Transition to the slider's disabled state -->
                            <Storyboard x:Key="Disabled State"> 
                                <DoubleAnimation Duration="0:0:0" Storyboard.TargetName="RootElement" Storyboard.TargetProperty="Opacity" To="0.5" />
                            </Storyboard>
 
                            <!-- RepeatButton Templates --> 
                            <ControlTemplate x:Key="RepeatButtonTemplate">
                                <Grid x:Name="RootElement" Background="Transparent" Opacity="0" /> 
                            </ControlTemplate>
                        </Grid.Resources>
 
                        <!-- Horizontal Template -->
                        <Grid x:Name="HorizontalTemplateElement">
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition Width="Auto" /> 
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" /> 
                            </Grid.ColumnDefinitions>

                            <!-- Track Layer --> 
                            <Rectangle Stroke="Black" StrokeThickness="0.5" Fill="#FFE6EFF7" Grid.Column="0" Grid.ColumnSpan="3" Height="3" Margin="5,0,5,0" />

                            <!-- Repeat Buttons + Thumb --> 
                            <RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButtonElement" Grid.Column="0" Template="{StaticResource RepeatButtonTemplate}" IsTabStop="False" /> 
                            <Thumb x:Name="HorizontalThumbElement" Height="18" Width="11" Grid.Column="1" />
                            <RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButtonElement" Grid.Column="2" Template="{StaticResource RepeatButtonTemplate}" IsTabStop="False" /> 
                        </Grid>

                        <!-- Vertical Template --> 
                        <Grid x:Name="VerticalTemplateElement" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" /> 
                                <RowDefinition Height="Auto" /> 
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions> 

                            <!-- Track Layer -->
                            <Rectangle Stroke="Black" StrokeThickness="0.5" Fill="#FFE6EFF7" Grid.Row="0" Grid.RowSpan="3" Width="3" Margin="0,5,0,5" /> 

                            <!-- Repeat Buttons + Thumb -->
                            <RepeatButton x:Name="VerticalTrackLargeChangeDecreaseRepeatButtonElement" Grid.Row="2" Template="{StaticResource RepeatButtonTemplate}" IsTabStop="False" /> 
                            <Thumb x:Name="VerticalThumbElement" Height="11" Width="18" Grid.Row="1" /> 
                            <RepeatButton x:Name="VerticalTrackLargeChangeIncreaseRepeatButtonElement" Grid.Row="0" Template="{StaticResource RepeatButtonTemplate}" IsTabStop="False" />
                        </Grid> 

                        <!-- Focus indicator -->
                        <Rectangle x:Name="FocusVisualElement" Stroke="#666666" StrokeDashArray=".2 5" 
                        StrokeDashCap="Round" IsHitTestVisible="false" />
                    </Grid>
                </ControlTemplate> 
            </Setter.Value> 
        </Setter>
    </Style> 

    <Style x:Key="GridSplitterPreviewStyle" TargetType="Control">
        <Setter Property="Template"> 
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <Rectangle Fill="#CCABB7C0"/> 
                </ControlTemplate> 
            </Setter.Value>
        </Setter> 
    </Style>
    <Style TargetType="local:GridSplitter">
        <Setter Property="Background" Value="#FFABB7C0"/> 
        <Setter Property="PreviewStyle" Value="{StaticResource GridSplitterPreviewStyle}"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="Template"> 
            <Setter.Value> 
                <ControlTemplate TargetType="local:GridSplitter">
                    <Grid x:Name="RootElement" IsHitTestVisible="{TemplateBinding IsEnabled}"> 
                        <Grid.Resources>
                            <Color x:Key="FocusColor">#FFE0E0E0</Color>
                            <Storyboard x:Key="Normal State" > 
                                <DoubleAnimation
                              Duration="0:0:0.0"
                              Storyboard.TargetName="RootElement" 
                              Storyboard.TargetProperty="Opacity" 
                              To="1.0" />
                            </Storyboard> 
                            <Storyboard x:Key="MouseOver State"/>
                            <Storyboard x:Key="Disabled State">
                                <DoubleAnimation 
                              Duration="0:0:0.0"
                              Storyboard.TargetName="RootElement"
                              Storyboard.TargetProperty="Opacity" 
                              To="0.5" /> 
                            </Storyboard>
                        </Grid.Resources> 
                        <Rectangle Fill="{TemplateBinding Background}" />
                        <Grid>
                            <Grid.RowDefinitions> 
                                <RowDefinition Height="47*"/>
                                <RowDefinition Height="6*"/>
                                <RowDefinition Height="47*"/> 
                            </Grid.RowDefinitions> 
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="47*"/> 
                                <ColumnDefinition Width="6*"/>
                                <ColumnDefinition Width="47*"/>
                            </Grid.ColumnDefinitions> 
                            <Rectangle Grid.Row="1" Grid.Column="1" Fill="White"/>
                        </Grid>
                        <Rectangle x:Name="FocusVisualElement" StrokeDashCap="Round" StrokeDashArray=".2 2" Visibility="Collapsed" IsHitTestVisible="false"> 
                            <Rectangle.Stroke> 
                                <SolidColorBrush Color="{StaticResource FocusColor}" />
                            </Rectangle.Stroke> 
                        </Rectangle>
                    </Grid>
                </ControlTemplate> 
            </Setter.Value>
        </Setter>
    </Style> 
 
</ResourceDictionary>
