|
@@ -0,0 +1,422 @@
|
|
|
|
|
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
|
+ <ResourceDictionary.MergedDictionaries>
|
|
|
|
|
+ <!--<ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Themes/Dark.xaml"/>
|
|
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml"/>-->
|
|
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Icons.xaml"/>
|
|
|
|
|
+ </ResourceDictionary.MergedDictionaries>
|
|
|
|
|
+ <!--年-->
|
|
|
|
|
+ <Style x:Key="Calendar.CalendarButton" TargetType="{x:Type CalendarButton}">
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SignatureAccent}" />
|
|
|
|
|
+ <Setter Property="FontSize" Value="15" />
|
|
|
|
|
+ <Setter Property="Height" Value="52" />
|
|
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
|
+ <Setter.Value>
|
|
|
|
|
+ <ControlTemplate TargetType="{x:Type CalendarButton}">
|
|
|
|
|
+ <Grid>
|
|
|
|
|
+ <Rectangle Name="SelectedBackground"
|
|
|
|
|
+ Fill="{TemplateBinding Control.Background}"
|
|
|
|
|
+ Opacity="0"
|
|
|
|
|
+ RadiusX="26"
|
|
|
|
|
+ RadiusY="26" />
|
|
|
|
|
+ <Rectangle Name="Background"
|
|
|
|
|
+ Fill="{TemplateBinding Control.Background}"
|
|
|
|
|
+ Opacity="0"
|
|
|
|
|
+ RadiusX="26"
|
|
|
|
|
+ RadiusY="26" />
|
|
|
|
|
+ <ContentPresenter Name="NormalText" Margin="1,0,1,1"
|
|
|
|
|
+ HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
|
|
|
|
|
+ VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
|
|
|
|
|
+ TextElement.Foreground="{DynamicResource Brush.Text}" />
|
|
|
|
|
+ <VisualStateManager.VisualStateGroups>
|
|
|
|
|
+ <VisualStateGroup x:Name="CommonStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0:0:0.1" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualState x:Name="Normal" />
|
|
|
|
|
+ <VisualState x:Name="MouseOver">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".5" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ <VisualState x:Name="Pressed">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".5" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ <VisualStateGroup x:Name="SelectionStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualState x:Name="Unselected" />
|
|
|
|
|
+ <VisualState x:Name="Selected">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="SelectedBackground" Storyboard.TargetProperty="Opacity" To=".75" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ <VisualStateGroup x:Name="ActiveStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualState x:Name="Active" />
|
|
|
|
|
+ <VisualState x:Name="Inactive">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <ColorAnimation Storyboard.TargetName="NormalText" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" To="#FF777777" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ </VisualStateManager.VisualStateGroups>
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ </ControlTemplate>
|
|
|
|
|
+ </Setter.Value>
|
|
|
|
|
+ </Setter>
|
|
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
|
+ <Setter Property="Width" Value="80" />
|
|
|
|
|
+ </Style>
|
|
|
|
|
+ <Style x:Key="{x:Type CalendarButton}" BasedOn="{StaticResource Calendar.CalendarButton}" TargetType="{x:Type CalendarButton}" />
|
|
|
|
|
+
|
|
|
|
|
+ <Style x:Key="Calendar.DayButton" TargetType="{x:Type CalendarDayButton}">
|
|
|
|
|
+ <Setter Property="FontFamily" Value="Arial" />
|
|
|
|
|
+ <Setter Property="FontSize" Value="13" />
|
|
|
|
|
+ <Setter Property="Height" Value="48" />
|
|
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
|
+ <Setter.Value>
|
|
|
|
|
+ <ControlTemplate TargetType="{x:Type CalendarDayButton}">
|
|
|
|
|
+ <Grid>
|
|
|
|
|
+ <Ellipse Name="TodayBackground" Opacity="0"
|
|
|
|
|
+ Fill="{DynamicResource Brush.Overlay12Percent}" />
|
|
|
|
|
+ <Ellipse Name="SelectedBackground"
|
|
|
|
|
+ Fill="{DynamicResource Brush.SignatureAccent}"
|
|
|
|
|
+ Opacity="0" />
|
|
|
|
|
+ <Border Background="{TemplateBinding Control.Background}"
|
|
|
|
|
+ BorderBrush="{TemplateBinding Control.BorderBrush}"
|
|
|
|
|
+ BorderThickness="{TemplateBinding Control.BorderThickness}" />
|
|
|
|
|
+ <Ellipse Name="HighlightBackground"
|
|
|
|
|
+ Fill="{DynamicResource Brush.SignatureAccent}"
|
|
|
|
|
+ Opacity="0" />
|
|
|
|
|
+ <ContentPresenter Name="NormalText" Margin="5,1,5,1"
|
|
|
|
|
+ HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
|
|
|
|
|
+ VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
|
|
|
|
|
+ TextElement.Foreground="{DynamicResource Brush.Text}" />
|
|
|
|
|
+ <Path Name="Blackout" Margin="3"
|
|
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
|
|
+ Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364"
|
|
|
|
|
+ Fill="#FF000000" Opacity="0"
|
|
|
|
|
+ RenderTransformOrigin="0.5,0.5"
|
|
|
|
|
+ Stretch="Fill" />
|
|
|
|
|
+ <VisualStateManager.VisualStateGroups>
|
|
|
|
|
+ <VisualStateGroup x:Name="CommonStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0:0:0.1" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualState x:Name="Normal" />
|
|
|
|
|
+ <VisualState x:Name="MouseOver">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="HighlightBackground" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ <VisualState x:Name="Pressed">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="HighlightBackground" Storyboard.TargetProperty="Opacity" To="0.5" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ <VisualState x:Name="Disabled">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="HighlightBackground" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="NormalText" Storyboard.TargetProperty="Opacity" To=".35" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ <VisualStateGroup x:Name="SelectionStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualState x:Name="Unselected" />
|
|
|
|
|
+ <VisualState x:Name="Selected">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="SelectedBackground" Storyboard.TargetProperty="Opacity" To=".75" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ <VisualStateGroup x:Name="CalendarButtonFocusStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ <VisualStateGroup x:Name="ActiveStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualState x:Name="Active" />
|
|
|
|
|
+ <VisualState x:Name="Inactive">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <ColorAnimation Storyboard.TargetName="NormalText" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" To="#FF777777" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ <VisualStateGroup x:Name="DayStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualState x:Name="RegularDay" />
|
|
|
|
|
+ <VisualState x:Name="Today">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="TodayBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
|
|
|
|
|
+ <ColorAnimation Storyboard.TargetName="NormalText" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" To="#FFFFFFFF" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ <VisualStateGroup x:Name="BlackoutDayStates">
|
|
|
|
|
+ <VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualTransition GeneratedDuration="0" />
|
|
|
|
|
+ </VisualStateGroup.Transitions>
|
|
|
|
|
+ <VisualState x:Name="NormalDay" />
|
|
|
|
|
+ <VisualState x:Name="BlackoutDay">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="Blackout" Storyboard.TargetProperty="Opacity" To=".2" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ </VisualStateManager.VisualStateGroups>
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ </ControlTemplate>
|
|
|
|
|
+ </Setter.Value>
|
|
|
|
|
+ </Setter>
|
|
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
|
+ <Setter Property="Width" Value="48" />
|
|
|
|
|
+ </Style>
|
|
|
|
|
+ <Style x:Key="{x:Type CalendarDayButton}" BasedOn="{StaticResource Calendar.DayButton}" TargetType="{x:Type CalendarDayButton}" />
|
|
|
|
|
+
|
|
|
|
|
+ <Style x:Key="Calendar.Item" TargetType="{x:Type CalendarItem}">
|
|
|
|
|
+ <Setter Property="Height" Value="400" />
|
|
|
|
|
+ <Setter Property="Margin" Value="0,3,0,3" />
|
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
|
+ <Setter.Value>
|
|
|
|
|
+ <ControlTemplate TargetType="{x:Type CalendarItem}">
|
|
|
|
|
+ <FrameworkTemplate.Resources>
|
|
|
|
|
+ <ResourceDictionary>
|
|
|
|
|
+ <DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
|
|
|
|
|
+ <TextBlock Margin="0,6,0,6" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
+ FontFamily="Arial"
|
|
|
|
|
+ FontSize="16"
|
|
|
|
|
+ Foreground="{DynamicResource Brush.Text}"
|
|
|
|
|
+ Text="{Binding}" />
|
|
|
|
|
+ </DataTemplate>
|
|
|
|
|
+ </ResourceDictionary>
|
|
|
|
|
+ </FrameworkTemplate.Resources>
|
|
|
|
|
+ <Grid Name="PART_Root">
|
|
|
|
|
+ <FrameworkElement.Resources>
|
|
|
|
|
+ <ResourceDictionary>
|
|
|
|
|
+ <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF" />
|
|
|
|
|
+ </ResourceDictionary>
|
|
|
|
|
+ </FrameworkElement.Resources>
|
|
|
|
|
+ <Border Padding="5" Background="{TemplateBinding Control.Background}"
|
|
|
|
|
+ BorderBrush="{TemplateBinding Control.BorderBrush}"
|
|
|
|
|
+ BorderThickness="{TemplateBinding Control.BorderThickness}">
|
|
|
|
|
+ <Grid>
|
|
|
|
|
+ <FrameworkElement.Resources>
|
|
|
|
|
+ <ResourceDictionary>
|
|
|
|
|
+ <ControlTemplate x:Key="HeaderButtonTemplate" TargetType="{x:Type Button}">
|
|
|
|
|
+ <Grid Cursor="Hand">
|
|
|
|
|
+ <ContentPresenter Name="buttonContent"
|
|
|
|
|
+ Margin="1,4,1,9"
|
|
|
|
|
+ HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
|
|
|
|
|
+ VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
|
|
|
|
|
+ Content="{TemplateBinding ContentControl.Content}"
|
|
|
|
|
+ ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
|
|
|
|
|
+ TextElement.Foreground="{DynamicResource Brush.Text}" />
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
+ <Setter TargetName="buttonContent" Property="TextElement.Foreground" Value="{DynamicResource Brush.Signature}" />
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="False">
|
|
|
|
|
+ <Setter TargetName="buttonContent" Property="TextElement.Foreground" Value="{DynamicResource Brush.Text}" />
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ <Trigger Property="IsEnabled" Value="False">
|
|
|
|
|
+ <Setter TargetName="buttonContent" Property="Opacity" Value=".5" />
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
|
+ </ControlTemplate>
|
|
|
|
|
+ </ResourceDictionary>
|
|
|
|
|
+ </FrameworkElement.Resources>
|
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
|
+ <Button x:Name="PART_PreviousButton"
|
|
|
|
|
+ Grid.Row="0"
|
|
|
|
|
+ Grid.Column="0"
|
|
|
|
|
+ HorizontalAlignment="Left"
|
|
|
|
|
+ Background="Transparent">
|
|
|
|
|
+ <Path Width="16" Height="16" StrokeThickness="2"
|
|
|
|
|
+ Data="{StaticResource Icon.ChevronLeft}"
|
|
|
|
|
+ Stretch="Uniform"
|
|
|
|
|
+ Stroke="{DynamicResource Brush.Icon}"/>
|
|
|
|
|
+ <Button.Style>
|
|
|
|
|
+ <Style TargetType="{x:Type Button}">
|
|
|
|
|
+ <Setter Property="Width" Value="48"/>
|
|
|
|
|
+ <Setter Property="Height" Value="48"/>
|
|
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Left"/>
|
|
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
|
+ <Setter Property="Focusable" Value="False"/>
|
|
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButton}"/>
|
|
|
|
|
+ <Setter Property="BorderThickness" Value="0"/>
|
|
|
|
|
+ <Setter Property="Cursor" Value="Hand"/>
|
|
|
|
|
+ <Style.Triggers>
|
|
|
|
|
+ <Trigger Property="IsEnabled" Value="False">
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonDisabled}"/>
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonMouseOver}"/>
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ <Trigger Property="IsPressed" Value="True">
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonPressed}"/>
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ </Style.Triggers>
|
|
|
|
|
+ </Style>
|
|
|
|
|
+ </Button.Style>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ <Button Name="PART_HeaderButton"
|
|
|
|
|
+ Grid.Row="0"
|
|
|
|
|
+ Grid.Column="1"
|
|
|
|
|
+ HorizontalAlignment="Center"
|
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
|
+ Focusable="False"
|
|
|
|
|
+ FontWeight="Bold"
|
|
|
|
|
+ FontFamily="Arial"
|
|
|
|
|
+ FontSize="16"
|
|
|
|
|
+ Template="{StaticResource HeaderButtonTemplate}" />
|
|
|
|
|
+ <Button x:Name="PART_NextButton"
|
|
|
|
|
+ Grid.Row="0"
|
|
|
|
|
+ Grid.Column="2"
|
|
|
|
|
+ Background="Transparent">
|
|
|
|
|
+ <Path Width="16" Height="16"
|
|
|
|
|
+ StrokeThickness="2"
|
|
|
|
|
+ Data="{StaticResource Icon.ChevronRight}"
|
|
|
|
|
+ Stroke="{DynamicResource Brush.Icon}"
|
|
|
|
|
+ Stretch="Uniform"/>
|
|
|
|
|
+ <Button.Style>
|
|
|
|
|
+ <Style TargetType="{x:Type Button}">
|
|
|
|
|
+ <Setter Property="Width" Value="48"/>
|
|
|
|
|
+ <Setter Property="Height" Value="48"/>
|
|
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Right"/>
|
|
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
|
+ <Setter Property="Focusable" Value="False"/>
|
|
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButton}"/>
|
|
|
|
|
+ <Setter Property="BorderThickness" Value="0"/>
|
|
|
|
|
+ <Setter Property="Cursor" Value="Hand"/>
|
|
|
|
|
+ <Style.Triggers>
|
|
|
|
|
+ <Trigger Property="IsEnabled" Value="False">
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonDisabled}"/>
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonMouseOver}"/>
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ <Trigger Property="IsPressed" Value="True">
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonPressed}"/>
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ </Style.Triggers>
|
|
|
|
|
+ </Style>
|
|
|
|
|
+ </Button.Style>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ <Grid Name="PART_MonthView" Row="1" ColumnSpan="3" Margin="6,-1,6,6" HorizontalAlignment="Center" Visibility="Visible">
|
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ <Grid Name="PART_YearView" Row="1" ColumnSpan="3" Margin="6,-3,7,6" HorizontalAlignment="Center" Visibility="Hidden">
|
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ <RowDefinition Height="*" />
|
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ </Border>
|
|
|
|
|
+ <Rectangle Name="PART_DisabledVisual" Opacity="0" RadiusX="2" RadiusY="2" Stretch="Fill" StrokeThickness="1" Visibility="Collapsed"
|
|
|
|
|
+ Fill="{DynamicResource DisabledColor}"
|
|
|
|
|
+ Stroke="{DynamicResource DisabledColor}"/>
|
|
|
|
|
+ <VisualStateManager.VisualStateGroups>
|
|
|
|
|
+ <VisualStateGroup x:Name="CommonStates">
|
|
|
|
|
+ <VisualState x:Name="Normal" />
|
|
|
|
|
+ <VisualState x:Name="Disabled">
|
|
|
|
|
+ <Storyboard>
|
|
|
|
|
+ <DoubleAnimation Storyboard.TargetName="PART_DisabledVisual"
|
|
|
|
|
+ Storyboard.TargetProperty="Opacity"
|
|
|
|
|
+ To="1" Duration="0" />
|
|
|
|
|
+ </Storyboard>
|
|
|
|
|
+ </VisualState>
|
|
|
|
|
+ </VisualStateGroup>
|
|
|
|
|
+ </VisualStateManager.VisualStateGroups>
|
|
|
|
|
+ </Grid>
|
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
|
+ <Trigger Property="IsEnabled" Value="False">
|
|
|
|
|
+ <Setter TargetName="PART_DisabledVisual" Property="Visibility" Value="Visible" />
|
|
|
|
|
+ </Trigger>
|
|
|
|
|
+ <DataTrigger Value="Year" Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}">
|
|
|
|
|
+ <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
|
|
|
|
|
+ <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
|
|
|
|
|
+ </DataTrigger>
|
|
|
|
|
+ <DataTrigger Value="Decade" Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}">
|
|
|
|
|
+ <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
|
|
|
|
|
+ <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
|
|
|
|
|
+ </DataTrigger>
|
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
|
+ </ControlTemplate>
|
|
|
|
|
+ </Setter.Value>
|
|
|
|
|
+ </Setter>
|
|
|
|
|
+ <Setter Property="Width" Value="400" />
|
|
|
|
|
+ </Style>
|
|
|
|
|
+ <Style x:Key="{x:Type CalendarItem}" BasedOn="{StaticResource Calendar.Item}" TargetType="{x:Type CalendarItem}" />
|
|
|
|
|
+
|
|
|
|
|
+ <Style x:Key="Calendar.Primary" TargetType="{x:Type Calendar}">
|
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource Brush.DarkBackground}" />
|
|
|
|
|
+ <Setter Property="Calendar.CalendarButtonStyle" Value="{StaticResource Calendar.CalendarButton}" />
|
|
|
|
|
+ <Setter Property="Calendar.CalendarDayButtonStyle" Value="{StaticResource Calendar.DayButton}" />
|
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
|
+ <Setter.Value>
|
|
|
|
|
+ <ControlTemplate TargetType="{x:Type Calendar}">
|
|
|
|
|
+ <StackPanel Name="PART_Root" HorizontalAlignment="Center">
|
|
|
|
|
+ <CalendarItem Name="PART_CalendarItem" Background="{TemplateBinding Control.Background}" />
|
|
|
|
|
+ </StackPanel>
|
|
|
|
|
+ </ControlTemplate>
|
|
|
|
|
+ </Setter.Value>
|
|
|
|
|
+ </Setter>
|
|
|
|
|
+ </Style>
|
|
|
|
|
+ <Style x:Key="{x:Type Calendar}" BasedOn="{StaticResource Calendar.Primary}" TargetType="{x:Type Calendar}" />
|
|
|
|
|
+
|
|
|
|
|
+</ResourceDictionary>
|