|
30 | 30 | <BooleanAnimationUsingKeyFrames Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="IsOpen">
|
31 | 31 | <DiscreteBooleanKeyFrame Value="True" KeyTime="0" />
|
32 | 32 | </BooleanAnimationUsingKeyFrames>
|
33 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentCoverGrid" Storyboard.TargetProperty="Opacity"> |
| 33 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentCoverBorder" Storyboard.TargetProperty="Opacity"> |
34 | 34 | <EasingDoubleKeyFrame Value="0" KeyTime="0" />
|
35 | 35 | <EasingDoubleKeyFrame Value="0.56" KeyTime="0:0:0.3">
|
36 | 36 | <EasingDoubleKeyFrame.EasingFunction>
|
|
69 | 69 | <BooleanAnimationUsingKeyFrames Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="IsOpen">
|
70 | 70 | <DiscreteBooleanKeyFrame Value="False" KeyTime="0:0:0.3" />
|
71 | 71 | </BooleanAnimationUsingKeyFrames>
|
72 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentCoverGrid" Storyboard.TargetProperty="Opacity"> |
| 72 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentCoverBorder" Storyboard.TargetProperty="Opacity"> |
73 | 73 | <EasingDoubleKeyFrame Value="0.56" KeyTime="0" />
|
74 | 74 | <EasingDoubleKeyFrame Value="0" KeyTime="0:0:0.3">
|
75 | 75 | <EasingDoubleKeyFrame.EasingFunction>
|
|
113 | 113 | Duration="0">
|
114 | 114 | <DiscreteBooleanKeyFrame Value="True" KeyTime="0" />
|
115 | 115 | </BooleanAnimationUsingKeyFrames>
|
116 |
| - <DoubleAnimation Storyboard.TargetName="PART_ContentCoverGrid" Storyboard.TargetProperty="Opacity" |
| 116 | + <DoubleAnimation Storyboard.TargetName="ContentCoverBorder" Storyboard.TargetProperty="Opacity" |
117 | 117 | Duration="0"
|
118 | 118 | To=".56" />
|
119 | 119 | <DoubleAnimation Storyboard.TargetName="PART_PopupContentElement" Storyboard.TargetProperty="Opacity"
|
|
132 | 132 | <BooleanAnimationUsingKeyFrames Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="IsOpen">
|
133 | 133 | <DiscreteBooleanKeyFrame Value="False" KeyTime="0" />
|
134 | 134 | </BooleanAnimationUsingKeyFrames>
|
135 |
| - <DoubleAnimation Storyboard.TargetName="PART_ContentCoverGrid" Storyboard.TargetProperty="Opacity" |
| 135 | + <DoubleAnimation Storyboard.TargetName="ContentCoverBorder" Storyboard.TargetProperty="Opacity" |
136 | 136 | To="0" Duration="0"/>
|
137 | 137 | </Storyboard>
|
138 | 138 | </VisualState>
|
|
193 | 193 | <ContentPresenter x:Name="ContentPresenter" Opacity="1" Content="{TemplateBinding ContentControl.Content}"
|
194 | 194 | ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" />
|
195 | 195 | </AdornerDecorator>
|
196 |
| - <Grid x:Name="PART_ContentCoverGrid" Background="{Binding OverlayBackground, RelativeSource={RelativeSource TemplatedParent}}" |
197 |
| - Opacity="0" IsHitTestVisible="False" Focusable="False"> |
198 |
| - <Grid.Style> |
199 |
| - <Style TargetType="Grid"> |
200 |
| - <Style.Triggers> |
201 |
| - <Trigger Property="Opacity" Value="0"> |
202 |
| - <Setter Property="Visibility" Value="Hidden" /> |
203 |
| - </Trigger> |
204 |
| - </Style.Triggers> |
205 |
| - </Style> |
206 |
| - </Grid.Style> |
| 196 | + <Grid x:Name="PART_ContentCoverGrid" Background="Transparent" IsHitTestVisible="False" Focusable="False" Visibility="{Binding ElementName=ContentCoverBorder, Path=Visibility}"> |
| 197 | + <Grid.OpacityMask> |
| 198 | + <VisualBrush Visual="{Binding ElementName=ContentCoverBorder}" /> |
| 199 | + </Grid.OpacityMask> |
| 200 | + <Border x:Name="ContentCoverBorder" Opacity="0" CornerRadius="{TemplateBinding CornerRadius}" Background="{Binding OverlayBackground, RelativeSource={RelativeSource TemplatedParent}}" IsHitTestVisible="False"> |
| 201 | + <Border.Style> |
| 202 | + <Style TargetType="Border"> |
| 203 | + <Style.Triggers> |
| 204 | + <Trigger Property="Opacity" Value="0"> |
| 205 | + <Setter Property="Visibility" Value="Hidden" /> |
| 206 | + </Trigger> |
| 207 | + </Style.Triggers> |
| 208 | + </Style> |
| 209 | + </Border.Style> |
| 210 | + </Border> |
207 | 211 | </Grid>
|
208 | 212 | </Grid>
|
209 | 213 | <ControlTemplate.Triggers>
|
|
234 | 238 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="Visibility">
|
235 | 239 | <DiscreteObjectKeyFrame Value="{x:Static Visibility.Visible}" KeyTime="0" />
|
236 | 240 | </ObjectAnimationUsingKeyFrames>
|
237 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentCoverGrid" Storyboard.TargetProperty="Opacity"> |
| 241 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentCoverBorder" Storyboard.TargetProperty="Opacity"> |
238 | 242 | <EasingDoubleKeyFrame Value="0" KeyTime="0" />
|
239 | 243 | <EasingDoubleKeyFrame Value="0.56" KeyTime="0:0:0.3">
|
240 | 244 | <EasingDoubleKeyFrame.EasingFunction>
|
|
273 | 277 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_Popup" Storyboard.TargetProperty="Visibility">
|
274 | 278 | <DiscreteObjectKeyFrame Value="{x:Static Visibility.Collapsed}" KeyTime="0:0:0.3" />
|
275 | 279 | </ObjectAnimationUsingKeyFrames>
|
276 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentCoverGrid" Storyboard.TargetProperty="Opacity"> |
| 280 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentCoverBorder" Storyboard.TargetProperty="Opacity"> |
277 | 281 | <EasingDoubleKeyFrame Value="0.56" KeyTime="0" />
|
278 | 282 | <EasingDoubleKeyFrame Value="0" KeyTime="0:0:0.3">
|
279 | 283 | <EasingDoubleKeyFrame.EasingFunction>
|
|
317 | 321 | Duration="0">
|
318 | 322 | <DiscreteObjectKeyFrame Value="{x:Static Visibility.Visible}" KeyTime="0" />
|
319 | 323 | </ObjectAnimationUsingKeyFrames>
|
320 |
| - <DoubleAnimation Storyboard.TargetName="PART_ContentCoverGrid" Storyboard.TargetProperty="Opacity" |
| 324 | + <DoubleAnimation Storyboard.TargetName="ContentCoverBorder" Storyboard.TargetProperty="Opacity" |
321 | 325 | Duration="0"
|
322 | 326 | To=".56" />
|
323 | 327 | <DoubleAnimation Storyboard.TargetName="PART_PopupContentElement" Storyboard.TargetProperty="Opacity"
|
|
337 | 341 | Duration="0">
|
338 | 342 | <DiscreteObjectKeyFrame Value="{x:Static Visibility.Collapsed}" KeyTime="0" />
|
339 | 343 | </ObjectAnimationUsingKeyFrames>
|
340 |
| - <DoubleAnimation Storyboard.TargetName="PART_ContentCoverGrid" Storyboard.TargetProperty="Opacity" |
| 344 | + <DoubleAnimation Storyboard.TargetName="ContentCoverBorder" Storyboard.TargetProperty="Opacity" |
341 | 345 | To="0" />
|
342 | 346 | </Storyboard>
|
343 | 347 | </VisualState>
|
|
347 | 351 | x:Name="ContentPresenter" Opacity="1"
|
348 | 352 | Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" />
|
349 | 353 |
|
350 |
| - <Grid x:Name="PART_ContentCoverGrid" |
351 |
| - Background="{Binding OverlayBackground, RelativeSource={RelativeSource TemplatedParent}}" |
352 |
| - Opacity="0" IsHitTestVisible="False" Focusable="False"> |
353 |
| - <Grid.Style> |
354 |
| - <Style TargetType="Grid"> |
355 |
| - <Style.Triggers> |
356 |
| - <Trigger Property="Opacity" Value="0"> |
357 |
| - <Setter Property="Visibility" Value="Hidden" /> |
358 |
| - </Trigger> |
359 |
| - </Style.Triggers> |
360 |
| - </Style> |
361 |
| - </Grid.Style> |
| 354 | + <Grid x:Name="PART_ContentCoverGrid" Background="Transparent" IsHitTestVisible="False" Focusable="False" Visibility="{Binding ElementName=ContentCoverBorder, Path=Visibility}"> |
| 355 | + <Grid.OpacityMask> |
| 356 | + <VisualBrush Visual="{Binding ElementName=ContentCoverBorder}" /> |
| 357 | + </Grid.OpacityMask> |
| 358 | + <Border x:Name="ContentCoverBorder" Opacity="0" CornerRadius="{TemplateBinding CornerRadius}" Background="{Binding OverlayBackground, RelativeSource={RelativeSource TemplatedParent}}" IsHitTestVisible="False"> |
| 359 | + <Border.Style> |
| 360 | + <Style TargetType="Border"> |
| 361 | + <Style.Triggers> |
| 362 | + <Trigger Property="Opacity" Value="0"> |
| 363 | + <Setter Property="Visibility" Value="Hidden" /> |
| 364 | + </Trigger> |
| 365 | + </Style.Triggers> |
| 366 | + </Style> |
| 367 | + </Border.Style> |
| 368 | + </Border> |
362 | 369 | </Grid>
|
363 | 370 |
|
364 | 371 | <Grid x:Name="PART_Popup" wpf:ThemeAssist.Theme="{TemplateBinding DialogTheme}"
|
|
0 commit comments