<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
                    xmlns:calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input">

    <Style TargetType="calendar:CalendarButton">
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate  TargetType="calendar:CalendarButton">
                    <Grid>
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualState x:Name="Normal" />
                                <vsm:VisualState x:Name="IsInAnotherView">
                                    <!--
                                    EXAMPLE!
                                    <Storyboard>
                                        <ColorAnimation
											Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
											Storyboard.TargetName="border"
											To="#4C6581C1" Duration="0:0:0.2"
										 />
                                        <ColorAnimation
											Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
											Storyboard.TargetName="PathColor"
											To="#FF2A4078" Duration="0:0:0.2"
										 />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>-->
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="IsNotFromCurrentView">

                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)"
                                                        Storyboard.TargetName="NormalText"
                                                        To="#7F000000"
                                                        Duration="0:0:0.2" />
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Disabled">





                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)"
                                                        Storyboard.TargetName="NormalText"
                                                        To="#33000000"
                                                        Duration="0:0:0.2" />
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>

                            <vsm:VisualStateGroup x:Name="FocusStates">
                                <vsm:VisualState x:Name="Unfocused" />
                                <vsm:VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">

                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>

                            <vsm:VisualStateGroup x:Name="SelectionStates">
                                <vsm:VisualState x:Name="Unselected" />
                                <vsm:VisualState x:Name="Highlighted">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="Background"
                                                         To="0.4"
                                                         Duration="0:0:0.2" />
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="Background"
                                                         To="0.7"
                                                         Duration="0:0:0.2" />
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>

                            <vsm:VisualStateGroup x:Name="ButtonType">
                                <vsm:VisualState x:Name="Date" />
                                <vsm:VisualState x:Name="WeekName">
                                    <Storyboard>
                                        <!-- TODO: Uncomment when this works. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalText" Storyboard.TargetProperty="(Control.FontWeight)" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Bold" />
                                        </ObjectAnimationUsingKeyFrames>-->

                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="WeekNumber" />
                                <vsm:VisualState x:Name="TodayDate">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         Storyboard.TargetName="TodayBackground"
                                                         To="0.8"
                                                         Duration="0:0:0.2" />
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Month" />
                                <vsm:VisualState x:Name="Year" />
                                <vsm:VisualState x:Name="Decade" />
                            </vsm:VisualStateGroup>

                        </vsm:VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="TodayBackground"
                                   Opacity="0"
                                   RadiusX="0"
                                   RadiusY="0"
                                   Stroke="#FFA63201">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1"
                                                     StartPoint="0.5,0">
                                    <GradientStop Color="#FFF06000"
                                                  Offset="0" />
                                    <GradientStop Color="#FFFF9100"
                                                  Offset="0.987" />
                                    <GradientStop Color="#FFFF7300"
                                                  Offset="0.513" />
                                    <GradientStop Color="#FFFF4D00"
                                                  Offset="0.509" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle x:Name="Background"
                                   Opacity="0"
                                   RadiusX="0"
                                   RadiusY="0"
                                   Stroke="#FFFFFFFF">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1"
                                                     StartPoint="0.5,0">
                                    <GradientStop Color="#FFC1D3FE"
                                                  Offset="0" />
                                    <GradientStop Color="#FFFFFFFF"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle x:Name="PressedIndent"
                                   Opacity="0"
                                   Margin="1,1,1,1"
                                   IsHitTestVisible="False"
                                   Stroke="#FF6E96F7"
                                   StrokeThickness="1" />
                        <Grid x:Name="FocusVisualElement"
                              IsHitTestVisible="False"
                              Visibility="Collapsed">
                            <Rectangle  IsHitTestVisible="False"
                                        Stroke="#FFFFFFFF"
                                        StrokeThickness="1" />
                            <Rectangle Margin="1,1,1,1"
                                       IsHitTestVisible="False"
                                       Stroke="#FF6E96F7"
                                       StrokeThickness="1" />
                        </Grid>
                        <ContentPresenter x:Name="NormalText"
                                          HorizontalAlignment="Center"
                                          Margin="{TemplateBinding Padding}"
                                          VerticalAlignment="Center"
                                          Content="{TemplateBinding Content}"
                                          Foreground="#333333"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          FontSize="10" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>