|
385 | 385 | <ControlTemplate x:Key="MaterialDesignComboBoxTemplate" TargetType="{x:Type ComboBox}"> |
386 | 386 | <Grid x:Name="templateRoot" |
387 | 387 | SnapsToDevicePixels="True" |
388 | | - UseLayoutRounding="True" |
389 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
390 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
| 388 | + UseLayoutRounding="True"> |
391 | 389 | <Grid.ColumnDefinitions> |
392 | 390 | <ColumnDefinition Width="*" /> |
393 | 391 | <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" /> |
|
399 | 397 | Grid.ColumnSpan="2" |
400 | 398 | IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
401 | 399 | Style="{StaticResource MaterialDesignComboBoxToggleButton}" /> |
402 | | - <Grid x:Name="ContentWrapper" |
403 | | - Margin="{TemplateBinding Padding}"> |
| 400 | + <Grid Margin="{TemplateBinding Padding}" |
| 401 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 402 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
404 | 403 | <TextBlock x:Name="Hint" |
405 | 404 | IsHitTestVisible="False" |
406 | 405 | Opacity="{Binding Path=(wpf:TextFieldAssist.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}" |
|
507 | 506 | <ThicknessAnimation Duration="0:0:0.3" |
508 | 507 | Storyboard.TargetName="Hint" |
509 | 508 | Storyboard.TargetProperty="(FrameworkElement.Margin)" |
510 | | - To="0,-14,0,0"> |
| 509 | + To="0,-12,0,0"> |
511 | 510 | <ThicknessAnimation.EasingFunction> |
512 | 511 | <SineEase EasingMode="EaseOut" /> |
513 | 512 | </ThicknessAnimation.EasingFunction> |
|
537 | 536 | </ThicknessAnimation> |
538 | 537 | </Storyboard> |
539 | 538 | </ControlTemplate.Resources> |
540 | | - <Grid x:Name="templateRoot" |
541 | | - UseLayoutRounding="True" |
542 | | - SnapsToDevicePixels="True"> |
543 | | - <Grid Margin="0 16 0 0" |
544 | | - x:Name="MarginWrapper"> |
| 539 | + <Grid x:Name="templateRoot"> |
| 540 | + <Grid Margin="0 12 0 0" |
| 541 | + SnapsToDevicePixels="True" |
| 542 | + UseLayoutRounding="True"> |
545 | 543 | <Grid.ColumnDefinitions> |
546 | 544 | <ColumnDefinition Width="*" /> |
547 | 545 | <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" /> |
|
552 | 550 | BorderBrush="{TemplateBinding BorderBrush}" |
553 | 551 | BorderThickness="{TemplateBinding BorderThickness}" |
554 | 552 | IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
555 | | - Style="{StaticResource MaterialDesignComboBoxToggleButton}" /> |
| 553 | + Style="{StaticResource MaterialDesignComboBoxToggleButton}"/> |
556 | 554 | <TextBlock x:Name="Hint" |
557 | 555 | Margin="{TemplateBinding Padding}" |
558 | 556 | FontSize="{TemplateBinding FontSize}" |
559 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 557 | + HorizontalAlignment="Left" |
560 | 558 | IsHitTestVisible="False" |
| 559 | + VerticalAlignment="Top" |
| 560 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" |
| 561 | + UseLayoutRounding="{TemplateBinding UseLayoutRounding}" |
561 | 562 | Opacity="{Binding Path=(wpf:TextFieldAssist.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}" |
562 | | - SnapsToDevicePixels="True" |
563 | | - UseLayoutRounding="True" |
564 | 563 | Text="{TemplateBinding wpf:TextFieldAssist.Hint}" /> |
565 | | - <Grid x:Name="ContentWrapper" |
| 564 | + <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 565 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
566 | 566 | Margin="{TemplateBinding Padding}" |
567 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
568 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
| 567 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" |
| 568 | + UseLayoutRounding="{TemplateBinding UseLayoutRounding}"> |
569 | 569 | <ContentPresenter x:Name="contentPresenter" |
570 | 570 | Content="{TemplateBinding SelectionBoxItem}" |
571 | 571 | ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" |
572 | 572 | ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" |
573 | 573 | ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" |
574 | | - IsHitTestVisible="false" |
575 | | - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
| 574 | + IsHitTestVisible="False"/> |
576 | 575 | <TextBox x:Name="PART_EditableTextBox" |
577 | 576 | IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" |
578 | 577 | Style="{StaticResource MaterialDesignComboBoxEditableTextBox}" |
|
672 | 671 | <Setter Property="ItemContainerStyle" Value="{StaticResource MaterialDesignComboBoxItemSelectedCollapsedStyle}" /> |
673 | 672 | <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> |
674 | 673 | <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> |
675 | | - <Setter Property="Padding" Value="0 4 0 4" /> |
676 | | - <Setter Property="VerticalContentAlignment" Value="Center" /> |
| 674 | + <Setter Property="Padding" Value="0 4 0 5" /> |
| 675 | + <Setter Property="VerticalContentAlignment" Value="Top" /> |
677 | 676 | <Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
678 | | - <Setter Property="HorizontalAlignment" Value="Left"/> |
679 | | - <Setter Property="VerticalAlignment" Value="Center"/> |
| 677 | + <Setter Property="HorizontalAlignment" Value="Stretch"/> |
| 678 | + <Setter Property="VerticalAlignment" Value="Top"/> |
680 | 679 | <Setter Property="ScrollViewer.CanContentScroll" Value="true" /> |
681 | 680 | <Setter Property="ScrollViewer.PanningMode" Value="Both" /> |
682 | | - <Setter Property="UseLayoutRounding" Value="False"/> |
683 | | - <Setter Property="SnapsToDevicePixels" Value="False"/> |
684 | 681 | <Setter Property="Stylus.IsFlicksEnabled" Value="False" /> |
685 | 682 | <Setter Property="Template" Value="{StaticResource MaterialDesignComboBoxTemplate}" /> |
686 | 683 | <Style.Triggers> |
|
0 commit comments