|
7 | 7 | <Setter Property="MinWidth" Value="5"/>
|
8 | 8 | <Setter Property="MinHeight" Value="5"/>
|
9 | 9 | <Setter Property="FontSize" Value="12"/>
|
| 10 | + <Setter Property="Cursor" Value="Hand"/> |
10 | 11 | <Setter Property="Background" Value="Transparent"/>
|
11 | 12 | <Setter Property="Margin" Value="2"/>
|
12 | 13 | <Setter Property="Width" Value="48" />
|
|
86 | 87 | <VisualTransition GeneratedDuration="0"/>
|
87 | 88 | </VisualStateGroup.Transitions>
|
88 | 89 | <VisualState x:Name="Active"/>
|
89 |
| - <VisualState x:Name="Inactive"> |
90 |
| - <Storyboard> |
91 |
| - <!--ColorAnimation Duration="0" To="#FF777777" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/--> |
92 |
| - </Storyboard> |
93 |
| - </VisualState> |
| 90 | + <VisualState x:Name="Inactive" /> |
94 | 91 | </VisualStateGroup>
|
95 | 92 | <VisualStateGroup x:Name="DayStates">
|
96 | 93 | <VisualStateGroup.Transitions>
|
|
113 | 110 | <VisualState x:Name="NormalDay"/>
|
114 | 111 | <VisualState x:Name="BlackoutDay">
|
115 | 112 | <Storyboard>
|
116 |
| - <DoubleAnimation Duration="0" To=".2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Blackout"/> |
| 113 | + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HighlightingBorder" /> |
| 114 | + <DoubleAnimation Duration="0" To="0.38" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NormalText" /> |
117 | 115 | </Storyboard>
|
118 | 116 | </VisualState>
|
119 | 117 | </VisualStateGroup>
|
120 | 118 | </VisualStateManager.VisualStateGroups>
|
121 | 119 | <Ellipse x:Name="TodayBackground" Fill="{DynamicResource PrimaryHueLightBrush}" Opacity="0" />
|
122 | 120 | <Ellipse x:Name="SelectedBackground" Fill="{DynamicResource PrimaryHueMidBrush}" Opacity="0" />
|
123 |
| - <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/> |
124 |
| - <Ellipse x:Name="HighlightBackground" Fill="{DynamicResource PrimaryHueDarkBrush}" Opacity="0" /> |
125 |
| - <ContentPresenter x:Name="NormalText" |
126 |
| - TextElement.Foreground="{TemplateBinding Foreground}" |
| 121 | + <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" /> |
| 122 | + <Border x:Name="HighlightingBorder" Opacity="1"> |
| 123 | + <Ellipse x:Name="HighlightBackground" Fill="{DynamicResource PrimaryHueDarkBrush}" Opacity="0" /> |
| 124 | + </Border> |
| 125 | + <ContentPresenter x:Name="NormalText" |
| 126 | + TextElement.Foreground="{TemplateBinding Foreground}" |
127 | 127 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
128 |
| - Margin="5,1,5,1" |
| 128 | + Margin="5,1,5,1" |
129 | 129 | VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
130 |
| - <Path x:Name="Blackout" |
131 |
| - Fill="#FF000000" |
132 |
| - HorizontalAlignment="Stretch" VerticalAlignment="Stretch" |
133 |
| - Margin="3" |
134 |
| - Opacity="0" |
135 |
| - RenderTransformOrigin="0.5,0.5" |
136 |
| - Stretch="Fill" |
137 |
| - 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 z" /> |
138 |
| - <Ellipse x:Name="DayButtonFocusVisual" Stroke="{DynamicResource PrimaryHueDarkBrush}" Opacity="0" Visibility="Collapsed" StrokeThickness="1"/> |
| 130 | + <Ellipse x:Name="DayButtonFocusVisual" Stroke="{DynamicResource PrimaryHueDarkBrush}" Opacity="0" Visibility="Collapsed" StrokeThickness="1" /> |
139 | 131 | </Grid>
|
140 | 132 | </ControlTemplate>
|
141 | 133 | </Setter.Value>
|
142 | 134 | </Setter>
|
| 135 | + <Style.Triggers> |
| 136 | + <Trigger Property="IsInactive" Value="True"> |
| 137 | + <Setter Property="MinHeight" Value="0" /> |
| 138 | + <Setter Property="MaxHeight" Value="0" /> |
| 139 | + </Trigger> |
| 140 | + <Trigger Property="IsBlackedOut" Value="True"> |
| 141 | + <Setter Property="Cursor" Value="No" /> |
| 142 | + </Trigger> |
| 143 | + </Style.Triggers> |
143 | 144 | </Style>
|
144 | 145 |
|
145 | 146 | <Style x:Key="MaterialDesignCalendarDayButton" TargetType="{x:Type CalendarDayButton}">
|
146 | 147 | <Setter Property="MinWidth" Value="5"/>
|
147 | 148 | <Setter Property="MinHeight" Value="5"/>
|
148 | 149 | <Setter Property="FontSize" Value="12"/>
|
| 150 | + <Setter Property="Cursor" Value="Hand" /> |
149 | 151 | <Setter Property="Margin" Value="2"/>
|
150 | 152 | <Setter Property="Width" Value="34" />
|
151 | 153 | <Setter Property="Height" Value="34" />
|
|
224 | 226 | <VisualTransition GeneratedDuration="0"/>
|
225 | 227 | </VisualStateGroup.Transitions>
|
226 | 228 | <VisualState x:Name="Active"/>
|
227 |
| - <VisualState x:Name="Inactive"> |
228 |
| - <Storyboard> |
229 |
| - <DoubleAnimation Duration="0" To="0.35" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NormalText"/> |
230 |
| - </Storyboard> |
231 |
| - </VisualState> |
| 229 | + <VisualState x:Name="Inactive"/> |
232 | 230 | </VisualStateGroup>
|
233 | 231 | <VisualStateGroup x:Name="DayStates">
|
234 | 232 | <VisualStateGroup.Transitions>
|
|
251 | 249 | <VisualState x:Name="NormalDay"/>
|
252 | 250 | <VisualState x:Name="BlackoutDay">
|
253 | 251 | <Storyboard>
|
254 |
| - <DoubleAnimation Duration="0" To="0.2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Blackout"/> |
| 252 | + <DoubleAnimation Duration="0" |
| 253 | + To="0" |
| 254 | + Storyboard.TargetProperty="Opacity" |
| 255 | + Storyboard.TargetName="HighlightingBorder"/> |
| 256 | + <DoubleAnimation Duration="0" |
| 257 | + To="0.38" |
| 258 | + Storyboard.TargetProperty="Opacity" |
| 259 | + Storyboard.TargetName="NormalText" /> |
255 | 260 | </Storyboard>
|
256 | 261 | </VisualState>
|
257 | 262 | </VisualStateGroup>
|
258 | 263 | </VisualStateManager.VisualStateGroups>
|
259 | 264 | <Ellipse x:Name="TodayBackground" Fill="{DynamicResource PrimaryHueLightBrush}" Opacity="0" />
|
260 | 265 | <Ellipse x:Name="SelectedBackground" Fill="{DynamicResource PrimaryHueMidBrush}" Opacity="0" />
|
261 | 266 | <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
|
262 |
| - <Ellipse x:Name="HighlightBackground" Fill="{DynamicResource PrimaryHueDarkBrush}" Opacity="0" /> |
263 |
| - <ContentPresenter x:Name="NormalText" TextElement.Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,1,5,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> |
264 |
| - <Path x:Name="Blackout" |
265 |
| - Data="M 16 0 l -16 16" |
266 |
| - StrokeThickness="1.5" |
267 |
| - Stroke="#FF000000" |
268 |
| - HorizontalAlignment="Stretch" |
269 |
| - VerticalAlignment="Stretch" |
270 |
| - Margin="3" |
271 |
| - Opacity="0" |
272 |
| - RenderTransformOrigin="0.5,0.5" |
273 |
| - Stretch="Fill"/> |
| 267 | + <Border x:Name="HighlightingBorder" Opacity="1"> |
| 268 | + <Ellipse x:Name="HighlightBackground" Fill="{DynamicResource PrimaryHueDarkBrush}" Opacity="0"/> |
| 269 | + </Border> |
| 270 | + <ContentPresenter x:Name="NormalText" TextElement.Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,1,5,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> |
274 | 271 | <Ellipse x:Name="DayButtonFocusVisual" Stroke="{DynamicResource PrimaryHueDarkBrush}" Opacity="0" Visibility="Collapsed" StrokeThickness="1"/>
|
275 | 272 | </Grid>
|
276 | 273 | </ControlTemplate>
|
277 | 274 | </Setter.Value>
|
278 | 275 | </Setter>
|
| 276 | + <Style.Triggers> |
| 277 | + <Trigger Property="IsInactive" Value="True"> |
| 278 | + <Setter Property="MinHeight" Value="0" /> |
| 279 | + <Setter Property="MaxHeight" Value="0" /> |
| 280 | + </Trigger> |
| 281 | + <Trigger Property="IsBlackedOut" Value="True"> |
| 282 | + <Setter Property="Cursor" Value="No" /> |
| 283 | + </Trigger> |
| 284 | + </Style.Triggers> |
279 | 285 | </Style>
|
280 | 286 |
|
281 | 287 | <Style x:Key="MaterialDesignCalendarItemPortrait" TargetType="{x:Type CalendarItem}">
|
|
433 | 439 | <TranslateTransform X="0"/>
|
434 | 440 | </Border.RenderTransform>
|
435 | 441 | </Border>
|
436 |
| - <Grid x:Name="PART_MonthView" RenderTransformOrigin="0, 0.5"> |
| 442 | + <Grid x:Name="PART_MonthView" RenderTransformOrigin="0, 0.5" MinHeight="254"> |
437 | 443 | <Grid.RenderTransform>
|
438 | 444 | <TranslateTransform X="0" />
|
439 | 445 | </Grid.RenderTransform>
|
|
0 commit comments