Skip to content

Commit 0e8fda8

Browse files
ahmed-abdelrazekKeboo
authored andcommitted
Change Calendar TodayBackground to Transparent with a circle around it (#1446)
* Change Calendar TodayBackground to SecondaryAccentBrush * Update Current date to a Transparent circle with black border like in https://material.io/components/pickers/ * Change TodayBackground Stroke color to Foreground color * Fix the text for current date is always black
1 parent 504e574 commit 0e8fda8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Calendar.xaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,6 @@
215215
<VisualState x:Name="Today">
216216
<Storyboard>
217217
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="TodayBackground"/>
218-
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground)" Storyboard.TargetName="NormalText">
219-
<DiscreteObjectKeyFrame Value="{DynamicResource PrimaryHueLightForegroundBrush}" KeyTime="0" />
220-
</ObjectAnimationUsingKeyFrames>
221218
</Storyboard>
222219
</VisualState>
223220
</VisualStateGroup>
@@ -241,8 +238,10 @@
241238
</VisualStateGroup>
242239
</VisualStateManager.VisualStateGroups>
243240
<Ellipse x:Name="TodayBackground"
244-
Fill="{DynamicResource PrimaryHueLightBrush}"
245-
Opacity="0" />
241+
Fill="Transparent"
242+
Opacity="0"
243+
StrokeThickness="1"
244+
Stroke="{TemplateBinding Foreground}"/>
246245
<Ellipse x:Name="SelectedBackground"
247246
Fill="{DynamicResource PrimaryHueMidBrush}"
248247
Opacity="0" />
@@ -294,7 +293,7 @@
294293
<ControlTemplate.Resources>
295294
<SineEase x:Key="EasingFunction" EasingMode="EaseOut"/>
296295
<CubicEase x:Key="EasingFunctionIn" EasingMode="EaseIn"/>
297-
296+
298297
<DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
299298
<TextBlock Foreground="{DynamicResource MaterialDesignToolTipBackground}"
300299
Opacity="0.65"
@@ -540,7 +539,7 @@
540539
<DoubleAnimation Storyboard.TargetName="PART_YearViewCopy"
541540
Storyboard.TargetProperty="(UIElement.Opacity)"
542541
From="1" To="0" Duration="0:0:0.450"/>
543-
542+
544543
<DoubleAnimation Storyboard.TargetName="PART_YearViewCopy"
545544
Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"
546545
From="0" To="-240" Duration="0:0:0.450"

0 commit comments

Comments
 (0)