|
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 |
|
|
176 | 178 | <VisualStateGroup.Transitions>
|
177 | 179 | <VisualTransition GeneratedDuration="0:0:0.3" To="Normal">
|
178 | 180 | <VisualTransition.GeneratedEasingFunction>
|
179 |
| - <CircleEase EasingMode="EaseOut"/> |
| 181 | + <CubicEase EasingMode="EaseOut"/> |
180 | 182 | </VisualTransition.GeneratedEasingFunction>
|
181 | 183 | </VisualTransition>
|
182 | 184 | </VisualStateGroup.Transitions>
|
|
212 | 214 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="Visibility">
|
213 | 215 | <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
214 | 216 | </ObjectAnimationUsingKeyFrames>
|
215 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost"> |
216 |
| - <EasingDoubleKeyFrame KeyTime="0" Value="0"/> |
217 |
| - <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> |
218 |
| - </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"> |
224 |
| - <EasingDoubleKeyFrame KeyTime="0" Value="0"/> |
225 |
| - <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> |
226 |
| - </DoubleAnimationUsingKeyFrames> |
| 217 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost" |
| 218 | + To="1" Duration="0:0:0.3"/> |
| 219 | + <DoubleAnimation Storyboard.TargetProperty="Tag" Storyboard.TargetName="ItemsScrollViewer" |
| 220 | + To="1" Duration="0:0:0.3"/> |
227 | 221 | </Storyboard>
|
228 | 222 | </VisualTransition>
|
229 | 223 | <VisualTransition GeneratedDuration="0" To="Collapsed">
|
230 | 224 | <Storyboard>
|
231 | 225 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="Visibility">
|
232 |
| - <DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Collapsed}" /> |
| 226 | + <DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="{x:Static Visibility.Collapsed}" /> |
233 | 227 | </ObjectAnimationUsingKeyFrames>
|
234 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost"> |
235 |
| - <EasingDoubleKeyFrame KeyTime="0" Value="1"/> |
236 |
| - <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> |
237 |
| - </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"> |
243 |
| - <EasingDoubleKeyFrame KeyTime="0" Value="1"/> |
244 |
| - <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/> |
245 |
| - </DoubleAnimationUsingKeyFrames> |
| 228 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost" |
| 229 | + To="0" Duration="0:0:0.3"/> |
| 230 | + <DoubleAnimation Storyboard.TargetProperty="Tag" Storyboard.TargetName="ItemsScrollViewer" |
| 231 | + To="0" Duration="0:0:0.3"/> |
246 | 232 | </Storyboard>
|
247 | 233 | </VisualTransition>
|
248 | 234 | </VisualStateGroup.Transitions>
|
249 | 235 | <VisualState x:Name="Expanded">
|
250 | 236 | <Storyboard>
|
251 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost"> |
252 |
| - <EasingDoubleKeyFrame KeyTime="0" Value="1"/> |
253 |
| - </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"> |
258 |
| - <EasingDoubleKeyFrame KeyTime="0:0:0" Value="1"/> |
259 |
| - </DoubleAnimationUsingKeyFrames> |
| 237 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost" |
| 238 | + To="1" Duration="0"/> |
| 239 | + <DoubleAnimation Storyboard.TargetProperty="Tag" Storyboard.TargetName="ItemsScrollViewer" |
| 240 | + To="1" Duration="0"/> |
260 | 241 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="Visibility">
|
261 | 242 | <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
262 | 243 | </ObjectAnimationUsingKeyFrames>
|
263 | 244 | </Storyboard>
|
264 | 245 | </VisualState>
|
265 | 246 | <VisualState x:Name="Collapsed">
|
266 | 247 | <Storyboard>
|
267 |
| - <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost"> |
268 |
| - <EasingDoubleKeyFrame KeyTime="0" Value="0"/> |
269 |
| - </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"> |
274 |
| - <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/> |
275 |
| - </DoubleAnimationUsingKeyFrames> |
| 248 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ItemsHost" |
| 249 | + To="0" Duration="0"/> |
| 250 | + <DoubleAnimation Storyboard.TargetProperty="Tag" Storyboard.TargetName="ItemsScrollViewer" |
| 251 | + To="0" Duration="0"/> |
276 | 252 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="Visibility">
|
277 | 253 | <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
|
278 | 254 | </ObjectAnimationUsingKeyFrames>
|
|
310 | 286 | <ContentPresenter x:Name="PART_Header" ContentSource="Header"/>
|
311 | 287 | </wpf:Ripple>
|
312 | 288 | </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> |
| 289 | + |
| 290 | + <ScrollViewer Grid.Column="1" Grid.Row="1" |
| 291 | + x:Name="ItemsScrollViewer" |
| 292 | + Margin="-16 0 0 0" |
| 293 | + VerticalScrollBarVisibility="Hidden" |
| 294 | + Grid.ColumnSpan="2"> |
| 295 | + <ScrollViewer.Tag> |
| 296 | + <system:Double>0.0</system:Double> |
| 297 | + </ScrollViewer.Tag> |
| 298 | + <ScrollViewer.Height> |
| 299 | + <MultiBinding Converter="{StaticResource MathMlpMultipleConverter}"> |
| 300 | + <Binding ElementName="ItemsHost" Path="ActualHeight"/> |
| 301 | + <Binding RelativeSource="{RelativeSource Self}" Path="Tag"/> |
| 302 | + </MultiBinding> |
| 303 | + </ScrollViewer.Height> |
| 304 | + <ItemsPresenter x:Name="ItemsHost" |
| 305 | + VerticalAlignment="Top" |
| 306 | + Opacity="0" |
| 307 | + Visibility="Collapsed"/> |
| 308 | + </ScrollViewer> |
327 | 309 | </Grid>
|
328 | 310 | <ControlTemplate.Triggers>
|
329 | 311 | <Trigger Property="HasItems" Value="false">
|
|
0 commit comments