|
12 | 12 | <converters:TextFieldHintVisibilityConverter x:Key="TextFieldHintVisibilityConverter" IsNotEmptyValue="Collapsed" />
|
13 | 13 | <converters:MathConverter x:Key="MathAddConverter" Operation="Add" />
|
14 | 14 | <converters:BrushRoundConverter x:Key="BrushRoundConverter" />
|
15 |
| - |
| 15 | + |
16 | 16 | <system:Double x:Key="PopupContentPresenterExtend">4</system:Double>
|
17 | 17 | <system:Double x:Key="PopupTopBottomMargin">8</system:Double>
|
18 | 18 | <system:Double x:Key="PopupLeftRightMargin">16</system:Double>
|
|
86 | 86 | </Grid>
|
87 | 87 | </Grid>
|
88 | 88 | </ControlTemplate>
|
89 |
| - |
| 89 | + |
90 | 90 | <ControlTemplate x:Key="PopupContentDownTemplate" TargetType="ContentControl">
|
91 | 91 | <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter=32}"
|
92 | 92 | Margin="6">
|
|
114 | 114 | CornerRadius="2 2 0 0"
|
115 | 115 | Background="{Binding ElementName=PART_Popup, Path=Background}"
|
116 | 116 | Height="{StaticResource PopupTopBottomMargin}"/>
|
117 |
| - |
| 117 | + |
118 | 118 | <Grid Grid.Row="1">
|
119 | 119 | <Grid.ColumnDefinitions>
|
120 | 120 | <ColumnDefinition Width="Auto"/>
|
|
147 | 147 | </Grid>
|
148 | 148 | </Grid>
|
149 | 149 | </ControlTemplate>
|
150 |
| - |
| 150 | + |
151 | 151 | <ControlTemplate x:Key="PopupContentDefaultTemplate" TargetType="ContentControl">
|
152 | 152 | <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter=32}"
|
153 | 153 | Margin="6">
|
|
424 | 424 | IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
|
425 | 425 | Style="{StaticResource MaterialDesignComboBoxEditableTextBox}"
|
426 | 426 | Visibility="Collapsed" />
|
427 |
| - |
| 427 | + |
428 | 428 | <wpf:SmartHint x:Name="Hint"
|
429 | 429 | HintProxy="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static converters:HintProxyFabricConverter.Instance}}"
|
430 | 430 | FontSize="{TemplateBinding FontSize}"
|
|
520 | 520 | <Trigger Property="IsKeyboardFocused" Value="true">
|
521 | 521 | <Setter TargetName="Underline" Property="IsActive" Value="True"/>
|
522 | 522 | </Trigger>
|
| 523 | + <Trigger Property="Validation.HasError" Value="true"> |
| 524 | + <Setter Property="BorderBrush" Value="{DynamicResource ValidationErrorBrush}"/> |
| 525 | + <Setter TargetName="Underline" Property="Background" Value="{DynamicResource ValidationErrorBrush}"/> |
| 526 | + </Trigger> |
| 527 | + <MultiTrigger> |
| 528 | + <MultiTrigger.Conditions> |
| 529 | + <Condition Property="IsMouseOver" Value="true" /> |
| 530 | + <Condition Property="Validation.HasError" Value="true" /> |
| 531 | + </MultiTrigger.Conditions> |
| 532 | + <Setter Property="BorderBrush" Value="{DynamicResource ValidationErrorBrush}"/> |
| 533 | + <Setter TargetName="Underline" Property="Background" Value="{DynamicResource ValidationErrorBrush}"/> |
| 534 | + </MultiTrigger> |
| 535 | + <MultiTrigger> |
| 536 | + <MultiTrigger.Conditions> |
| 537 | + <Condition Property="IsMouseOver" Value="true" /> |
| 538 | + <Condition Property="Validation.HasError" Value="false" /> |
| 539 | + </MultiTrigger.Conditions> |
| 540 | + <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}"/> |
| 541 | + <Setter TargetName="Underline" Property="Background" Value="{DynamicResource PrimaryHueMidBrush}"/> |
| 542 | + </MultiTrigger> |
523 | 543 | </ControlTemplate.Triggers>
|
524 | 544 | </ControlTemplate>
|
525 | 545 |
|
|
543 | 563 | <Setter Property="Validation.ErrorTemplate" Value="{StaticResource MaterialDesignValidationErrorTemplate}"/>
|
544 | 564 | <Setter Property="Template" Value="{StaticResource MaterialDesignFloatingHintComboBoxTemplate}" />
|
545 | 565 | <Style.Triggers>
|
546 |
| - <Trigger Property="IsMouseOver" Value="true"> |
547 |
| - <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}" /> |
548 |
| - </Trigger> |
549 | 566 | <Trigger Property="IsKeyboardFocused" Value="true">
|
550 | 567 | <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}" />
|
551 | 568 | </Trigger>
|
|
0 commit comments