|
12 | 12 | <converters:MathConverter x:Key="MathAddConverter" Operation="Add" /> |
13 | 13 | <converters:BrushRoundConverter x:Key="BrushRoundConverter" /> |
14 | 14 |
|
15 | | - <Storyboard x:Key="MaterialDesignComboBoxPopupAnimationExpand"> |
16 | | - <!-- |
17 | | - <ThicknessAnimation AccelerationRatio="0.7" |
18 | | - DecelerationRatio="0.3" |
19 | | - Duration="0:0:0.3" |
20 | | - From="16 0 16 0" |
21 | | - Storyboard.TargetName="shadow" |
22 | | - Storyboard.TargetProperty="Margin" |
23 | | - To="0 0 0 0" /> |
24 | | - <DoubleAnimation AccelerationRatio="0.7" |
25 | | - DecelerationRatio="0.3" |
26 | | - Duration="0:0:0.4" |
27 | | - From="0" |
28 | | - Storyboard.TargetName="PopupTemplateRootGrid" |
29 | | - Storyboard.TargetProperty="Opacity" |
30 | | - To="1" /> |
31 | | - --> |
32 | | - </Storyboard> |
33 | | - |
34 | | - <Storyboard x:Key="MaterialDesignComboBoxPopupAnimationCollapse"> |
35 | | - <!-- |
36 | | - <DoubleAnimation Duration="0:0:0" |
37 | | - Storyboard.TargetName="PopupTemplateRootGrid" |
38 | | - Storyboard.TargetProperty="Opacity" |
39 | | - To="0" /> |
40 | | - <ThicknessAnimation Duration="0:0:0.3" |
41 | | - Storyboard.TargetName="shadow" |
42 | | - Storyboard.TargetProperty="Margin" |
43 | | - To="11 0 11 0" /> |
44 | | - --> |
45 | | - </Storyboard> |
46 | | - |
47 | 15 | <Style x:Key="FocusVisual"> |
48 | 16 | <Setter Property="Control.Template"> |
49 | 17 | <Setter.Value> |
|
334 | 302 | <Border x:Name="shadow" |
335 | 303 | Background="Transparent" |
336 | 304 | BorderBrush="{DynamicResource MaterialDesignShadowBrush}" |
337 | | - Opacity="0.72" |
338 | 305 | BorderThickness="1" |
339 | 306 | CornerRadius="2"> |
340 | 307 | <Border.Effect> |
341 | | - <BlurEffect Radius="3"/> |
| 308 | + <BlurEffect Radius="6"/> |
342 | 309 | </Border.Effect> |
343 | 310 | </Border> |
344 | 311 | <Grid Margin="1"> |
|
400 | 367 | <Setter TargetName="Underline" Property="Visibility" Value="Hidden"/> |
401 | 368 | <Setter TargetName="toggleButton" Property="Visibility" Value="Hidden"/> |
402 | 369 | </MultiTrigger> |
403 | | - <Trigger Property="IsDropDownOpen" Value="True"> |
404 | | - <Trigger.EnterActions> |
405 | | - <BeginStoryboard Storyboard="{DynamicResource MaterialDesignComboBoxPopupAnimationExpand}" /> |
406 | | - </Trigger.EnterActions> |
407 | | - <Trigger.ExitActions> |
408 | | - <BeginStoryboard Storyboard="{DynamicResource MaterialDesignComboBoxPopupAnimationCollapse}" /> |
409 | | - </Trigger.ExitActions> |
410 | | - </Trigger> |
411 | 370 | <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true"> |
412 | 371 | <Setter TargetName="shadow" Property="Margin" Value="0" /> |
413 | 372 | </Trigger> |
|
532 | 491 | UseLayoutRounding="True" |
533 | 492 | Placement="RelativePoint" |
534 | 493 | PopupAnimation="Fade" |
535 | | - VerticalOffset="-21"> |
| 494 | + VerticalOffset="-9"> |
536 | 495 | <Grid MinWidth="{Binding ActualWidth, ElementName=templateRoot, Converter={StaticResource MathAddConverter}, ConverterParameter=32}" |
537 | 496 | MaxHeight="{TemplateBinding MaxDropDownHeight}" |
538 | 497 | Margin="6"> |
|
542 | 501 | <Border x:Name="shadow" |
543 | 502 | Background="Transparent" |
544 | 503 | BorderBrush="{DynamicResource MaterialDesignShadowBrush}" |
545 | | - Opacity="0.72" |
546 | 504 | BorderThickness="1" |
547 | 505 | CornerRadius="2"> |
548 | 506 | <Border.Effect> |
549 | | - <BlurEffect Radius="3"/> |
| 507 | + <BlurEffect Radius="6" /> |
550 | 508 | </Border.Effect> |
551 | 509 | </Border> |
552 | 510 | <Grid Margin="1"> |
|
559 | 517 | </Grid.RowDefinitions> |
560 | 518 | <Rectangle Grid.Row="0" |
561 | 519 | Fill="{DynamicResource MaterialDesignPaper}" |
562 | | - Height="20"/> |
| 520 | + Height="8"/> |
563 | 521 |
|
564 | 522 | <Grid Grid.Row="1"> |
565 | 523 | <Grid.ColumnDefinitions> |
|
597 | 555 | </Grid> |
598 | 556 | <ControlTemplate.Triggers> |
599 | 557 | <Trigger Property="wpf:TextFieldAssist.IsNullOrEmpty" Value="False"> |
600 | | - <!-- |
601 | | - <Setter TargetName="GridContentCloneWrapper" Property="Margin" Value="16 4 16 4" /> |
602 | | - <Setter TargetName="PART_Popup" Property="VerticalOffset" Value="-20" /> |
603 | | - --> |
604 | 558 | <Trigger.EnterActions> |
605 | 559 | <BeginStoryboard x:Name="MoveHintAsideStoryboard_BeginStoryboard" Storyboard="{StaticResource MoveHintAsideStoryboard}" /> |
606 | 560 | </Trigger.EnterActions> |
|
610 | 564 | </Trigger> |
611 | 565 |
|
612 | 566 | <Trigger Property="IsEditable" Value="True"> |
613 | | - <!-- |
614 | | - <Setter TargetName="GridContentCloneWrapper" Property="Margin" Value="16 4 16 4" /> |
615 | | - <Setter TargetName="PART_Popup" Property="VerticalOffset" Value="-20" /> |
616 | | - --> |
617 | | - |
618 | 567 | <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" /> |
619 | 568 | <Setter TargetName="Underline" Property="Visibility" Value="Visible" /> |
620 | 569 | <Setter TargetName="contentPresenter" Property="Visibility" Value="Collapsed" /> |
621 | 570 | </Trigger> |
| 571 | + <MultiTrigger> |
| 572 | + <MultiTrigger.Conditions> |
| 573 | + <Condition Property="IsEditable" Value="False"/> |
| 574 | + <Condition Property="IsDropDownOpen" Value="True"/> |
| 575 | + </MultiTrigger.Conditions> |
| 576 | + <Setter TargetName="Underline" Property="Visibility" Value="Hidden"/> |
| 577 | + <Setter TargetName="toggleButton" Property="Visibility" Value="Hidden"/> |
| 578 | + </MultiTrigger> |
622 | 579 | <MultiTrigger> |
623 | 580 | <MultiTrigger.Conditions> |
624 | 581 | <Condition Property="wpf:TextFieldAssist.IsNullOrEmpty" Value="False" /> |
|
654 | 611 | </ControlTemplate> |
655 | 612 |
|
656 | 613 | <Style x:Key="MaterialDesignComboBox" TargetType="{x:Type ComboBox}"> |
657 | | - <Setter Property="wpf:ComboBoxAssist.ManagedOverlay" Value="True"/> |
658 | 614 | <Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
659 | 615 | <Setter Property="Background" Value="Transparent"/> |
660 | 616 | <Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignTextBoxBorder}"/> |
|
664 | 620 | <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> |
665 | 621 | <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> |
666 | 622 | <Setter Property="Padding" Value="0 4 0 4" /> |
667 | | - <Setter Property="VerticalContentAlignment" Value="Bottom" /> |
| 623 | + <Setter Property="VerticalContentAlignment" Value="Center" /> |
668 | 624 | <Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
669 | 625 | <Setter Property="HorizontalAlignment" Value="Left"/> |
670 | | - <Setter Property="VerticalAlignment" Value="Bottom"/> |
| 626 | + <Setter Property="VerticalAlignment" Value="Center"/> |
671 | 627 | <Setter Property="ScrollViewer.CanContentScroll" Value="true" /> |
672 | 628 | <Setter Property="ScrollViewer.PanningMode" Value="Both" /> |
673 | 629 | <Setter Property="UseLayoutRounding" Value="False"/> |
|
0 commit comments