更新
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the MIT License.
|
||||
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
All Rights Reserved.
|
||||
-->
|
||||
|
||||
<ResourceDictionary
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFluent.Controls">
|
||||
@@ -16,7 +9,9 @@
|
||||
The behavior of the calendar needs to be changed but without creating a new control.
|
||||
All this in order to use the appearance of the picker compatible with MS Office.
|
||||
-->
|
||||
|
||||
<!--<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/WPFluent;component/Themes/Light.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>-->
|
||||
<!-- HINT: Day button style -->
|
||||
<Style x:Key="DefaultCalendarDayButtonStyle" TargetType="CalendarDayButton">
|
||||
<Setter Property="MinWidth" Value="30" />
|
||||
@@ -30,7 +25,7 @@
|
||||
<Grid>
|
||||
<Rectangle
|
||||
x:Name="TodayBackground"
|
||||
Fill="{DynamicResource CalendarViewTodayBackground}"
|
||||
Fill="{DynamicResource SystemFillColorAttentionBrush}"
|
||||
Opacity="0"
|
||||
RadiusX="99"
|
||||
RadiusY="99" />
|
||||
@@ -39,7 +34,7 @@
|
||||
Opacity="0"
|
||||
RadiusX="99"
|
||||
RadiusY="99"
|
||||
Stroke="{DynamicResource CalendarViewSelectedBorderBrush}"
|
||||
Stroke="{DynamicResource SystemFillColorAttentionBrush}"
|
||||
StrokeThickness="1" />
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
@@ -47,7 +42,7 @@
|
||||
BorderThickness="{TemplateBinding BorderThickness}" />
|
||||
<Rectangle
|
||||
x:Name="HighlightBackground"
|
||||
Fill="{DynamicResource CalendarViewItemBackgroundPointerOver}"
|
||||
Fill="{DynamicResource ControlFillColorSecondaryBrush}"
|
||||
Opacity="0"
|
||||
RadiusX="99"
|
||||
RadiusY="99" />
|
||||
@@ -56,7 +51,7 @@
|
||||
Margin="5,1,5,1"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
TextBlock.Foreground="{DynamicResource CalendarViewForeground}" />
|
||||
TextBlock.Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Rectangle
|
||||
x:Name="DayButtonFocusVisual"
|
||||
IsHitTestVisible="false"
|
||||
@@ -174,7 +169,7 @@
|
||||
Duration="0" />
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalText" Storyboard.TargetProperty="(TextBlock.Foreground)">
|
||||
<ObjectAnimationUsingKeyFrames.KeyFrames>
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{DynamicResource CalendarViewTodayForeground}" />
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames.KeyFrames>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
@@ -201,13 +196,13 @@
|
||||
<Grid>
|
||||
<Rectangle
|
||||
x:Name="SelectedBackground"
|
||||
Fill="{DynamicResource CalendarViewSelectedBackground}"
|
||||
Fill="{DynamicResource SystemFillColorAttentionBrush}"
|
||||
Opacity="0"
|
||||
RadiusX="99"
|
||||
RadiusY="99" />
|
||||
<Rectangle
|
||||
x:Name="Background"
|
||||
Fill="{DynamicResource CalendarViewItemBackgroundPointerOver}"
|
||||
Fill="{DynamicResource ControlFillColorSecondaryBrush}"
|
||||
Opacity="0"
|
||||
RadiusX="99"
|
||||
RadiusY="99" />
|
||||
@@ -216,13 +211,13 @@
|
||||
Margin="1,0,1,1"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
TextBlock.Foreground="{DynamicResource CalendarViewForeground}" />
|
||||
TextBlock.Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Rectangle
|
||||
x:Name="CalendarButtonFocusVisual"
|
||||
IsHitTestVisible="false"
|
||||
RadiusX="99"
|
||||
RadiusY="99"
|
||||
Stroke="{DynamicResource CalendarViewForeground}"
|
||||
Stroke="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Visibility="Collapsed" />
|
||||
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
@@ -264,7 +259,7 @@
|
||||
Duration="0" />
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalText" Storyboard.TargetProperty="(TextBlock.Foreground)">
|
||||
<ObjectAnimationUsingKeyFrames.KeyFrames>
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{DynamicResource CalendarViewTodayForeground}" />
|
||||
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
||||
</ObjectAnimationUsingKeyFrames.KeyFrames>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
@@ -334,13 +329,13 @@
|
||||
Padding="6,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Appearance="Secondary"
|
||||
Appearance="Accent"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Focusable="False"
|
||||
FontSize="14"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource CalendarViewForeground}" />
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<controls:Button
|
||||
x:Name="PART_PreviousButton"
|
||||
Grid.Column="1"
|
||||
@@ -350,12 +345,12 @@
|
||||
Padding="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Appearance="Secondary"
|
||||
Appearance="Accent"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Content=""
|
||||
Focusable="False"
|
||||
Foreground="{DynamicResource CalendarViewButtonForeground}">
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}">
|
||||
<controls:Button.Icon>
|
||||
<controls:SymbolIcon
|
||||
Filled="True"
|
||||
@@ -372,12 +367,12 @@
|
||||
Padding="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Appearance="Secondary"
|
||||
Appearance="Accent"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Content=""
|
||||
Focusable="False"
|
||||
Foreground="{DynamicResource CalendarViewButtonForeground}">
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}">
|
||||
<controls:Button.Icon>
|
||||
<controls:SymbolIcon
|
||||
Filled="True"
|
||||
@@ -471,7 +466,7 @@
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource CalendarViewForeground}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Text="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ControlTemplate.Resources>
|
||||
@@ -486,7 +481,7 @@
|
||||
<Setter Property="CalendarButtonStyle" Value="{StaticResource DefaultCalendarButtonStyle}" />
|
||||
<Setter Property="CalendarDayButtonStyle" Value="{StaticResource DefaultCalendarDayButtonStyle}" />
|
||||
<Setter Property="CalendarItemStyle" Value="{StaticResource DefaultCalendarItemStyle}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarViewForeground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
@@ -497,8 +492,8 @@
|
||||
x:Name="PART_Root"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
Background="{DynamicResource CalendarViewBackground}"
|
||||
BorderBrush="{DynamicResource CalendarViewBorderBrush}"
|
||||
Background="{DynamicResource AcrylicBackgroundFillColorDefaultBrush}"
|
||||
BorderBrush="{DynamicResource SurfaceStrokeColorFlyoutBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8">
|
||||
<CalendarItem
|
||||
|
||||
Reference in New Issue
Block a user