|
1 | 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | 3 | xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf" |
4 | | - xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters"> |
| 4 | + xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters" |
| 5 | + xmlns:system="clr-namespace:System;assembly=mscorlib"> |
5 | 6 |
|
6 | 7 | <ResourceDictionary.MergedDictionaries> |
7 | 8 | <ResourceDictionary> |
8 | 9 | <converters:BrushRoundConverter x:Key="BrushRoundConverter"/> |
| 10 | + <converters:MathMultipleConverter x:Key="MathMlpMultipleConverter" Operation="Multiply" /> |
9 | 11 | </ResourceDictionary> |
10 | 12 | </ResourceDictionary.MergedDictionaries> |
11 | 13 |
|
|
216 | 218 | <EasingDoubleKeyFrame KeyTime="0" Value="0"/> |
217 | 219 | <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> |
218 | 220 | </DoubleAnimationUsingKeyFrames> |
219 | | - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="ItemsHost"> |
220 | | - <EasingDoubleKeyFrame KeyTime="0" Value=".5"/> |
221 | | - <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> |
222 | | - </DoubleAnimationUsingKeyFrames> |
223 | | - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="ItemsHost"> |
| 221 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Tag" Storyboard.TargetName="ItemsScrollViewer"> |
224 | 222 | <EasingDoubleKeyFrame KeyTime="0" Value="0"/> |
225 | 223 | <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> |
226 | 224 | </DoubleAnimationUsingKeyFrames> |
|
235 | 233 | <EasingDoubleKeyFrame KeyTime="0" Value="1"/> |
236 | 234 | <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> |
237 | 235 | </DoubleAnimationUsingKeyFrames> |
238 | | - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="ItemsHost"> |
239 | | - <EasingDoubleKeyFrame KeyTime="0" Value="1"/> |
240 | | - <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value=".5"/> |
241 | | - </DoubleAnimationUsingKeyFrames> |
242 | | - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="ItemsHost"> |
| 236 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Tag" Storyboard.TargetName="ItemsScrollViewer"> |
243 | 237 | <EasingDoubleKeyFrame KeyTime="0" Value="1"/> |
244 | 238 | <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/> |
245 | 239 | </DoubleAnimationUsingKeyFrames> |
|
251 | 245 | <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost"> |
252 | 246 | <EasingDoubleKeyFrame KeyTime="0" Value="1"/> |
253 | 247 | </DoubleAnimationUsingKeyFrames> |
254 | | - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="ItemsHost"> |
255 | | - <EasingDoubleKeyFrame KeyTime="0:0:0" Value="1"/> |
256 | | - </DoubleAnimationUsingKeyFrames> |
257 | | - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="ItemsHost"> |
| 248 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Tag" Storyboard.TargetName="ItemsScrollViewer"> |
258 | 249 | <EasingDoubleKeyFrame KeyTime="0:0:0" Value="1"/> |
259 | 250 | </DoubleAnimationUsingKeyFrames> |
260 | 251 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="Visibility"> |
|
267 | 258 | <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost"> |
268 | 259 | <EasingDoubleKeyFrame KeyTime="0" Value="0"/> |
269 | 260 | </DoubleAnimationUsingKeyFrames> |
270 | | - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="ItemsHost"> |
271 | | - <EasingDoubleKeyFrame KeyTime="0:0:0" Value=".5"/> |
272 | | - </DoubleAnimationUsingKeyFrames> |
273 | | - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="ItemsHost"> |
| 261 | + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Tag" Storyboard.TargetName="ItemsScrollViewer"> |
274 | 262 | <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/> |
275 | 263 | </DoubleAnimationUsingKeyFrames> |
276 | 264 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="Visibility"> |
|
310 | 298 | <ContentPresenter x:Name="PART_Header" ContentSource="Header"/> |
311 | 299 | </wpf:Ripple> |
312 | 300 | </Grid> |
313 | | - |
314 | | - <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1" RenderTransformOrigin="0,0" |
315 | | - Opacity="0" |
316 | | - Margin="-16 0 0 0" |
317 | | - Visibility="Collapsed"> |
318 | | - <ItemsPresenter.LayoutTransform> |
319 | | - <TransformGroup> |
320 | | - <ScaleTransform ScaleX=".5" ScaleY="0"/> |
321 | | - <SkewTransform/> |
322 | | - <RotateTransform/> |
323 | | - <TranslateTransform/> |
324 | | - </TransformGroup> |
325 | | - </ItemsPresenter.LayoutTransform> |
326 | | - </ItemsPresenter> |
| 301 | + |
| 302 | + <ScrollViewer Grid.Column="1" Grid.Row="1" |
| 303 | + x:Name="ItemsScrollViewer" |
| 304 | + Margin="-16 0 0 0" |
| 305 | + VerticalScrollBarVisibility="Hidden" |
| 306 | + Grid.ColumnSpan="2"> |
| 307 | + <ScrollViewer.Tag> |
| 308 | + <system:Double>0.0</system:Double> |
| 309 | + </ScrollViewer.Tag> |
| 310 | + <ScrollViewer.Height> |
| 311 | + <MultiBinding Converter="{StaticResource MathMlpMultipleConverter}"> |
| 312 | + <Binding ElementName="ItemsHost" Path="ActualHeight"/> |
| 313 | + <Binding RelativeSource="{RelativeSource Self}" Path="Tag"/> |
| 314 | + </MultiBinding> |
| 315 | + </ScrollViewer.Height> |
| 316 | + <ItemsPresenter x:Name="ItemsHost" |
| 317 | + Opacity="0" |
| 318 | + Visibility="Collapsed"/> |
| 319 | + </ScrollViewer> |
327 | 320 | </Grid> |
328 | 321 | <ControlTemplate.Triggers> |
329 | 322 | <Trigger Property="HasItems" Value="false"> |
|
0 commit comments