|
9 | 9 | </ResourceDictionary.MergedDictionaries>
|
10 | 10 |
|
11 | 11 | <converters:TextFieldHintVisibilityConverter x:Key="TextFieldHintVisibilityConverter" />
|
12 |
| - <converters:MathConverter Operation="Add" x:Key="MathAddConverter"/> |
13 |
| - <converters:BrushRoundConverter x:Key="BrushRoundConverter"/> |
14 |
| - <converters:MathMultipleConverter x:Key="MathMultipleConverter" Operation="Multiply"/> |
15 |
| - |
16 |
| - <Storyboard x:Key="MaterialDesignComboBoxPopupAnimationExpand"> |
17 |
| - <ThicknessAnimation Storyboard.TargetName="shadow" |
18 |
| - Storyboard.TargetProperty="Margin" |
19 |
| - From="16 0 16 0" To="0 0 0 0" |
20 |
| - AccelerationRatio="0.7" DecelerationRatio="0.3" |
21 |
| - Duration="0:0:0.3"/> |
22 |
| - <DoubleAnimation Storyboard.TargetName="AnimationScrollViewer" |
23 |
| - Storyboard.TargetProperty="Tag" |
24 |
| - From="0" To="1" |
25 |
| - AccelerationRatio="0.7" DecelerationRatio="0.3" |
26 |
| - Duration="0:0:0.5"/> |
27 |
| - <DoubleAnimation Storyboard.TargetName="PopupTemplateRootGrid" |
28 |
| - Storyboard.TargetProperty="Opacity" |
29 |
| - AccelerationRatio="0.7" DecelerationRatio="0.3" |
30 |
| - From="0" To="1" Duration="0:0:0.4"/> |
31 |
| - </Storyboard> |
32 |
| - |
33 |
| - <Storyboard x:Key="MaterialDesignComboBoxPopupAnimationCollapse"> |
34 |
| - <DoubleAnimation Storyboard.TargetName="PopupTemplateRootGrid" |
35 |
| - Storyboard.TargetProperty="Opacity" |
36 |
| - To="0" Duration="0:0:0"/> |
37 |
| - <DoubleAnimation Storyboard.TargetName="AnimationScrollViewer" |
38 |
| - Storyboard.TargetProperty="Tag" |
39 |
| - To="0" Duration="0:0:0"/> |
40 |
| - <ThicknessAnimation Storyboard.TargetName="shadow" |
41 |
| - Storyboard.TargetProperty="Margin" |
42 |
| - To="16 0 16 0" Duration="0:0:0"/> |
43 |
| - </Storyboard> |
| 12 | + <converters:MathConverter Operation="Add" x:Key="MathAddConverter"/> |
| 13 | + <converters:BrushRoundConverter x:Key="BrushRoundConverter"/> |
44 | 14 |
|
45 | 15 | <Style x:Key="FocusVisual">
|
46 | 16 | <Setter Property="Control.Template">
|
|
158 | 128 | </MultiTrigger>
|
159 | 129 | </ControlTemplate.Triggers>
|
160 | 130 | </ControlTemplate>
|
161 |
| - |
| 131 | + |
162 | 132 | <Style x:Key="MaterialDesignComboBoxItemStyle" TargetType="{x:Type ComboBoxItem}">
|
163 | 133 | <Setter Property="SnapsToDevicePixels" Value="True"/>
|
164 | 134 | <Setter Property="Padding" Value="16 8"/>
|
|
171 | 141 | <Setter Property="Template" Value="{StaticResource MaterialDesignComboBoxItemTemplate}"/>
|
172 | 142 | </Style>
|
173 | 143 |
|
174 |
| - |
175 | 144 | <Style x:Key="MaterialDesignComboBoxItemSelectedCollapsedStyle" TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource MaterialDesignComboBoxItemStyle}">
|
176 | 145 | <Setter Property="Tag" Value="1.0"/>
|
177 | 146 | </Style>
|
178 | 147 |
|
179 |
| - |
180 |
| - |
181 | 148 | <Style x:Key="MaterialDesignComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
|
182 | 149 | <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
|
183 | 150 | <Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
251 | 218 | Grid.ColumnSpan="2"
|
252 | 219 | IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
253 | 220 | Style="{StaticResource MaterialDesignComboBoxToggleButton}"/>
|
254 |
| - |
255 |
| - |
256 | 221 | <TextBlock x:Name="Hint"
|
257 | 222 | Margin="{TemplateBinding Padding}"
|
258 | 223 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
289 | 254 | VerticalOffset="-12"
|
290 | 255 | HorizontalOffset="-16"
|
291 | 256 | IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
292 |
| - PopupAnimation="None" |
| 257 | + PopupAnimation="Fade" |
293 | 258 | Placement="RelativePoint">
|
294 | 259 | <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
295 | 260 | x:Name="PopupTemplateRootGrid"
|
|
343 | 308 | SnapsToDevicePixels="True"/>
|
344 | 309 | </Grid>
|
345 | 310 | </Grid>
|
346 |
| - <ScrollViewer Grid.Row="1" |
347 |
| - x:Name="AnimationScrollViewer" |
348 |
| - VerticalScrollBarVisibility="Hidden"> |
349 |
| - <ScrollViewer.Tag> |
350 |
| - <system:Double>0.0</system:Double> |
351 |
| - </ScrollViewer.Tag> |
352 |
| - <ScrollViewer.Height> |
353 |
| - <MultiBinding Converter="{StaticResource MathMultipleConverter}"> |
354 |
| - <Binding Path="ActualHeight" ElementName="DropDownScrollViewer"/> |
355 |
| - <Binding Path="Tag" RelativeSource="{RelativeSource Self}" /> |
356 |
| - </MultiBinding> |
357 |
| - </ScrollViewer.Height> |
358 |
| - <ScrollViewer x:Name="DropDownScrollViewer"> |
359 |
| - <StackPanel x:Name="ItemsPresenter" |
360 |
| - HorizontalAlignment="Stretch" |
361 |
| - IsItemsHost="True" |
362 |
| - KeyboardNavigation.DirectionalNavigation="Contained" |
363 |
| - UseLayoutRounding="True" |
364 |
| - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> |
365 |
| - </ScrollViewer> |
| 311 | + <ScrollViewer Grid.Row="1"> |
| 312 | + <ItemsPresenter x:Name="ItemsPresenter" |
| 313 | + KeyboardNavigation.DirectionalNavigation="Contained" /> |
366 | 314 | </ScrollViewer>
|
367 | 315 | <Rectangle Grid.Row="2"
|
368 | 316 | Height="8"
|
|
377 | 325 | <Setter TargetName="Underline" Property="Visibility" Value="Visible"/>
|
378 | 326 | <Setter TargetName="contentPresenter" Property="Visibility" Value="Collapsed"/>
|
379 | 327 | </Trigger>
|
380 |
| - <Trigger Property="IsDropDownOpen" Value="True"> |
381 |
| - <Trigger.EnterActions> |
382 |
| - <BeginStoryboard Storyboard="{DynamicResource MaterialDesignComboBoxPopupAnimationExpand}"/> |
383 |
| - </Trigger.EnterActions> |
384 |
| - <Trigger.ExitActions> |
385 |
| - <BeginStoryboard Storyboard="{DynamicResource MaterialDesignComboBoxPopupAnimationCollapse}"/> |
386 |
| - </Trigger.ExitActions> |
387 |
| - </Trigger> |
388 | 328 | <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
|
389 | 329 | <Setter Property="Margin" TargetName="shadow" Value="0"/>
|
390 | 330 | </Trigger>
|
|
481 | 421 | IsActive="{Binding ElementName=PART_EditableTextBox, Path=IsKeyboardFocused}"
|
482 | 422 | Visibility="Collapsed" />
|
483 | 423 |
|
484 |
| - |
485 | 424 | <Popup x:Name="PART_Popup"
|
486 | 425 | Grid.ColumnSpan="2"
|
487 | 426 | AllowsTransparency="true"
|
488 | 427 | Focusable="False"
|
489 | 428 | VerticalOffset="-15"
|
490 | 429 | HorizontalOffset="-16"
|
491 | 430 | IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
492 |
| - PopupAnimation="None" |
| 431 | + PopupAnimation="Fade" |
493 | 432 | Placement="RelativePoint">
|
494 | 433 | <Popup.RenderTransform>
|
495 | 434 | <ScaleTransform ScaleY="1"/>
|
|
560 | 499 | </Grid>
|
561 | 500 | </Grid>
|
562 | 501 | </Grid>
|
563 |
| - <ScrollViewer Grid.Row="1" |
564 |
| - x:Name="AnimationScrollViewer" |
565 |
| - VerticalScrollBarVisibility="Hidden"> |
566 |
| - <ScrollViewer.Tag> |
567 |
| - <system:Double>0.0</system:Double> |
568 |
| - </ScrollViewer.Tag> |
569 |
| - <ScrollViewer.Height> |
570 |
| - <MultiBinding Converter="{StaticResource MathMultipleConverter}"> |
571 |
| - <Binding Path="ActualHeight" ElementName="DropDownScrollViewer"/> |
572 |
| - <Binding Path="Tag" RelativeSource="{RelativeSource Self}" /> |
573 |
| - </MultiBinding> |
574 |
| - </ScrollViewer.Height> |
575 |
| - <ScrollViewer x:Name="DropDownScrollViewer"> |
576 |
| - <StackPanel x:Name="ItemsPresenter" |
577 |
| - HorizontalAlignment="Stretch" |
578 |
| - IsItemsHost="True" |
579 |
| - KeyboardNavigation.DirectionalNavigation="Contained" |
580 |
| - UseLayoutRounding="True" |
581 |
| - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> |
582 |
| - </ScrollViewer> |
| 502 | + <ScrollViewer Grid.Row="1"> |
| 503 | + <ItemsPresenter x:Name="ItemsPresenter" |
| 504 | + KeyboardNavigation.DirectionalNavigation="Contained" /> |
583 | 505 | </ScrollViewer>
|
584 | 506 | <Rectangle Grid.Row="2"
|
585 | 507 | Height="8"
|
|
601 | 523 | <BeginStoryboard x:Name="MoveHintBackStoryboard_BeginStoryboard" Storyboard="{StaticResource MoveHintBackStoryboard}"/>
|
602 | 524 | </Trigger.ExitActions>
|
603 | 525 | </Trigger>
|
604 |
| - |
| 526 | + |
605 | 527 | <Trigger Property="IsEditable" Value="True">
|
606 | 528 | <Setter TargetName="GridContentCloneWrapper" Property="Margin" Value="16.5 25 16 4"/>
|
607 | 529 | <Setter TargetName="PART_Popup" Property="VerticalOffset" Value="-23"/>
|
608 |
| - |
| 530 | + |
609 | 531 | <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible"/>
|
610 | 532 | <Setter TargetName="Underline" Property="Visibility" Value="Visible"/>
|
611 | 533 | <Setter TargetName="contentPresenter" Property="Visibility" Value="Collapsed"/>
|
612 | 534 | </Trigger>
|
613 |
| - |
614 |
| - <Trigger Property="IsDropDownOpen" Value="True"> |
615 |
| - <Trigger.EnterActions> |
616 |
| - <BeginStoryboard Storyboard="{DynamicResource MaterialDesignComboBoxPopupAnimationExpand}"/> |
617 |
| - </Trigger.EnterActions> |
618 |
| - <Trigger.ExitActions> |
619 |
| - <BeginStoryboard Storyboard="{DynamicResource MaterialDesignComboBoxPopupAnimationCollapse}"/> |
620 |
| - </Trigger.ExitActions> |
621 |
| - </Trigger> |
622 | 535 | <MultiTrigger>
|
623 | 536 | <MultiTrigger.Conditions>
|
624 | 537 | <Condition Property="wpf:TextFieldAssist.IsNullOrEmpty" Value="False" />
|
|
0 commit comments