|
486 | 486 | </ControlTemplate>
|
487 | 487 |
|
488 | 488 | <ControlTemplate x:Key="MaterialDesignFloatingHintComboBoxTemplate" TargetType="{x:Type ComboBox}">
|
489 |
| - <ControlTemplate.Resources> |
490 |
| - <Storyboard x:Key="MoveHintAsideStoryboard"> |
491 |
| - <DoubleAnimation Duration="0:0:0.3" |
492 |
| - Storyboard.TargetName="Hint" |
493 |
| - Storyboard.TargetProperty="FontSize" |
494 |
| - To="10"> |
495 |
| - <DoubleAnimation.EasingFunction> |
496 |
| - <SineEase EasingMode="EaseOut" /> |
497 |
| - </DoubleAnimation.EasingFunction> |
498 |
| - </DoubleAnimation> |
499 |
| - <DoubleAnimation Duration="0:0:0.3" |
500 |
| - Storyboard.TargetName="Hint" |
501 |
| - Storyboard.TargetProperty="Opacity" |
502 |
| - To="1"> |
503 |
| - <DoubleAnimation.EasingFunction> |
504 |
| - <SineEase EasingMode="EaseOut" /> |
505 |
| - </DoubleAnimation.EasingFunction> |
506 |
| - </DoubleAnimation> |
507 |
| - <ThicknessAnimation Duration="0:0:0.3" |
508 |
| - Storyboard.TargetName="Hint" |
509 |
| - Storyboard.TargetProperty="(FrameworkElement.Margin)" |
510 |
| - To="0,-12,0,0"> |
511 |
| - <ThicknessAnimation.EasingFunction> |
512 |
| - <SineEase EasingMode="EaseOut" /> |
513 |
| - </ThicknessAnimation.EasingFunction> |
514 |
| - </ThicknessAnimation> |
515 |
| - </Storyboard> |
516 |
| - <Storyboard x:Key="MoveHintBackStoryboard"> |
517 |
| - <DoubleAnimation Duration="0:0:0.3" |
518 |
| - Storyboard.TargetName="Hint" |
519 |
| - Storyboard.TargetProperty="FontSize"> |
520 |
| - <DoubleAnimation.EasingFunction> |
521 |
| - <SineEase EasingMode="EaseOut" /> |
522 |
| - </DoubleAnimation.EasingFunction> |
523 |
| - </DoubleAnimation> |
524 |
| - <DoubleAnimation Duration="0:0:0.3" |
525 |
| - Storyboard.TargetName="Hint" |
526 |
| - Storyboard.TargetProperty="Opacity"> |
527 |
| - <DoubleAnimation.EasingFunction> |
528 |
| - <SineEase EasingMode="EaseOut" /> |
529 |
| - </DoubleAnimation.EasingFunction> |
530 |
| - </DoubleAnimation> |
531 |
| - <ThicknessAnimation Duration="0:0:0.3" |
532 |
| - Storyboard.TargetName="Hint" |
533 |
| - Storyboard.TargetProperty="(FrameworkElement.Margin)"> |
534 |
| - <ThicknessAnimation.EasingFunction> |
535 |
| - <SineEase EasingMode="EaseOut" /> |
536 |
| - </ThicknessAnimation.EasingFunction> |
537 |
| - </ThicknessAnimation> |
538 |
| - </Storyboard> |
539 |
| - </ControlTemplate.Resources> |
540 | 489 | <Grid x:Name="templateRoot">
|
| 490 | + <VisualStateManager.VisualStateGroups> |
| 491 | + <VisualStateGroup x:Name="MaterialDesignStates"> |
| 492 | + <VisualStateGroup.Transitions> |
| 493 | + <VisualTransition From="*" To="MaterialDesignStateTextNotEmpty"> |
| 494 | + <Storyboard> |
| 495 | + <DoubleAnimation Storyboard.TargetProperty="FontSize" Storyboard.TargetName="Hint" |
| 496 | + Duration="0:0:0.3" To="10"> |
| 497 | + <DoubleAnimation.EasingFunction> |
| 498 | + <SineEase EasingMode="EaseOut" /> |
| 499 | + </DoubleAnimation.EasingFunction> |
| 500 | + </DoubleAnimation> |
| 501 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Hint" |
| 502 | + Duration="0:0:0.3" To="1"> |
| 503 | + <DoubleAnimation.EasingFunction> |
| 504 | + <SineEase EasingMode="EaseOut" /> |
| 505 | + </DoubleAnimation.EasingFunction> |
| 506 | + </DoubleAnimation> |
| 507 | + <ThicknessAnimation Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="Hint" |
| 508 | + Duration="0:0:0.3" To="1,-12,1,0"> |
| 509 | + <ThicknessAnimation.EasingFunction> |
| 510 | + <SineEase EasingMode="EaseOut" /> |
| 511 | + </ThicknessAnimation.EasingFunction> |
| 512 | + </ThicknessAnimation> |
| 513 | + </Storyboard> |
| 514 | + </VisualTransition> |
| 515 | + <VisualTransition From="*" To="MaterialDesignStateTextEmpty"> |
| 516 | + <Storyboard> |
| 517 | + <DoubleAnimation Storyboard.TargetProperty="FontSize" Storyboard.TargetName="Hint" |
| 518 | + Duration="0:0:0.3"> |
| 519 | + <DoubleAnimation.EasingFunction> |
| 520 | + <SineEase EasingMode="EaseOut" /> |
| 521 | + </DoubleAnimation.EasingFunction> |
| 522 | + </DoubleAnimation> |
| 523 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Hint" |
| 524 | + Duration="0:0:0.3"> |
| 525 | + <DoubleAnimation.EasingFunction> |
| 526 | + <SineEase EasingMode="EaseOut" /> |
| 527 | + </DoubleAnimation.EasingFunction> |
| 528 | + </DoubleAnimation> |
| 529 | + <ThicknessAnimation Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="Hint" |
| 530 | + Duration="0:0:0.3"> |
| 531 | + <ThicknessAnimation.EasingFunction> |
| 532 | + <SineEase EasingMode="EaseOut" /> |
| 533 | + </ThicknessAnimation.EasingFunction> |
| 534 | + </ThicknessAnimation> |
| 535 | + </Storyboard> |
| 536 | + </VisualTransition> |
| 537 | + </VisualStateGroup.Transitions> |
| 538 | + <VisualState x:Name="MaterialDesignStateTextNotEmpty"> |
| 539 | + <Storyboard> |
| 540 | + <DoubleAnimation Storyboard.TargetProperty="FontSize" Storyboard.TargetName="Hint" |
| 541 | + Duration="0" To="10" /> |
| 542 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Hint" |
| 543 | + Duration="0" To="1" /> |
| 544 | + <ThicknessAnimation Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="Hint" |
| 545 | + Duration="0" To="1,-12,1,0" /> |
| 546 | + </Storyboard> |
| 547 | + </VisualState> |
| 548 | + <VisualState x:Name="MaterialDesignStateTextEmpty"> |
| 549 | + <Storyboard> |
| 550 | + <DoubleAnimation Storyboard.TargetProperty="FontSize" Storyboard.TargetName="Hint" |
| 551 | + Duration="0" /> |
| 552 | + <DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Hint" |
| 553 | + Duration="0" /> |
| 554 | + <ThicknessAnimation Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="Hint" |
| 555 | + Duration="0" /> |
| 556 | + </Storyboard> |
| 557 | + </VisualState> |
| 558 | + </VisualStateGroup> |
| 559 | + </VisualStateManager.VisualStateGroups> |
541 | 560 | <Grid Margin="0 12 0 0"
|
542 | 561 | SnapsToDevicePixels="True"
|
543 |
| - UseLayoutRounding="True"> |
| 562 | + UseLayoutRounding="True"> |
544 | 563 | <Grid.ColumnDefinitions>
|
545 | 564 | <ColumnDefinition Width="*" />
|
546 | 565 | <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
|
|
610 | 629 | </Grid>
|
611 | 630 | </Grid>
|
612 | 631 | <ControlTemplate.Triggers>
|
613 |
| - <Trigger Property="wpf:TextFieldAssist.IsNullOrEmpty" Value="False"> |
614 |
| - <Trigger.EnterActions> |
615 |
| - <BeginStoryboard x:Name="MoveHintAsideStoryboard_BeginStoryboard" Storyboard="{StaticResource MoveHintAsideStoryboard}" /> |
616 |
| - </Trigger.EnterActions> |
617 |
| - <Trigger.ExitActions> |
618 |
| - <BeginStoryboard x:Name="MoveHintBackStoryboard_BeginStoryboard" Storyboard="{StaticResource MoveHintBackStoryboard}" /> |
619 |
| - </Trigger.ExitActions> |
620 |
| - </Trigger> |
621 | 632 |
|
622 | 633 | <Trigger Property="IsEditable" Value="True">
|
623 | 634 | <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
|
|
0 commit comments