File tree Expand file tree Collapse file tree 6 files changed +40
-0
lines changed
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent Expand file tree Collapse file tree 6 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 44
44
<Thickness x : Key =" DatePickerHostPadding" >0,1,0,2</Thickness >
45
45
<Thickness x : Key =" DatePickerHostMonthPadding" >9,0,0,1</Thickness >
46
46
<Thickness x : Key =" ComboBoxEditableTextPadding" >10,0,30,0</Thickness >
47
+ <Thickness x : Key =" TextControlErrorBorderPadding" >1</Thickness >
47
48
48
49
<system : Double x : Key =" ComboBoxMinHeight" >24</system : Double >
49
50
<!-- <Thickness x:Key="ComboBoxPadding">12,1,0,3</Thickness> -->
Original file line number Diff line number Diff line change 233
233
</ControlTemplate .Triggers>
234
234
</ControlTemplate >
235
235
236
+ <ControlTemplate x : Key =" DefaultTextBoxInvalidationStyle" >
237
+ <Border
238
+ BorderBrush =" {DynamicResource SystemFillColorCriticalBrush}"
239
+ BorderThickness =" {DynamicResource TextControlBorderThemeThickness}"
240
+ CornerRadius =" {DynamicResource ControlCornerRadius}"
241
+ Padding =" {StaticResource TextControlErrorBorderPadding}" >
242
+ <AdornedElementPlaceholder />
243
+ </Border >
244
+ </ControlTemplate >
245
+
236
246
<Style x : Key =" DefaultTextBoxStyle" TargetType =" {x:Type TextBox}" >
237
247
<Setter Property =" FocusVisualStyle" Value =" {x:Null}" />
248
+ <Setter Property =" Validation.ErrorTemplate" Value =" {DynamicResource DefaultTextBoxInvalidationStyle}" />
238
249
<Setter Property =" ContextMenu" Value =" {DynamicResource DefaultControlContextMenu}" />
239
250
<Setter Property =" Foreground" Value =" {DynamicResource TextControlForeground}" />
240
251
<Setter Property =" CaretBrush" Value =" {DynamicResource TextControlForeground}" />
Original file line number Diff line number Diff line change 78
78
<Thickness x : Key =" DatePickerHostPadding" >0,1,0,2</Thickness >
79
79
<Thickness x : Key =" DatePickerHostMonthPadding" >9,0,0,1</Thickness >
80
80
<Thickness x : Key =" ComboBoxEditableTextPadding" >10,0,30,0</Thickness >
81
+ <Thickness x : Key =" TextControlErrorBorderPadding" >1</Thickness >
81
82
<system : Double x : Key =" ComboBoxMinHeight" >24</system : Double >
82
83
<!-- <Thickness x:Key="ComboBoxPadding">12,1,0,3</Thickness> -->
83
84
<system : Double x : Key =" NavigationViewItemOnLeftMinHeight" >32</system : Double >
4959
4960
</Trigger >
4960
4961
</ControlTemplate .Triggers>
4961
4962
</ControlTemplate >
4963
+ <ControlTemplate x : Key =" DefaultTextBoxInvalidationStyle" >
4964
+ <Border BorderBrush =" {DynamicResource SystemFillColorCriticalBrush}" BorderThickness =" {DynamicResource TextControlBorderThemeThickness}" CornerRadius =" {DynamicResource ControlCornerRadius}" Padding =" {StaticResource TextControlErrorBorderPadding}" >
4965
+ <AdornedElementPlaceholder />
4966
+ </Border >
4967
+ </ControlTemplate >
4962
4968
<Style x : Key =" DefaultTextBoxStyle" TargetType =" {x:Type TextBox}" >
4963
4969
<Setter Property =" FocusVisualStyle" Value =" {x:Null}" />
4970
+ <Setter Property =" Validation.ErrorTemplate" Value =" {DynamicResource DefaultTextBoxInvalidationStyle}" />
4964
4971
<Setter Property =" ContextMenu" Value =" {DynamicResource DefaultControlContextMenu}" />
4965
4972
<Setter Property =" Foreground" Value =" {DynamicResource TextControlForeground}" />
4966
4973
<Setter Property =" CaretBrush" Value =" {DynamicResource TextControlForeground}" />
Original file line number Diff line number Diff line change 78
78
<Thickness x : Key =" DatePickerHostPadding" >0,1,0,2</Thickness >
79
79
<Thickness x : Key =" DatePickerHostMonthPadding" >9,0,0,1</Thickness >
80
80
<Thickness x : Key =" ComboBoxEditableTextPadding" >10,0,30,0</Thickness >
81
+ <Thickness x : Key =" TextControlErrorBorderPadding" >1</Thickness >
81
82
<system : Double x : Key =" ComboBoxMinHeight" >24</system : Double >
82
83
<!-- <Thickness x:Key="ComboBoxPadding">12,1,0,3</Thickness> -->
83
84
<system : Double x : Key =" NavigationViewItemOnLeftMinHeight" >32</system : Double >
4872
4873
</Trigger >
4873
4874
</ControlTemplate .Triggers>
4874
4875
</ControlTemplate >
4876
+ <ControlTemplate x : Key =" DefaultTextBoxInvalidationStyle" >
4877
+ <Border BorderBrush =" {DynamicResource SystemFillColorCriticalBrush}" BorderThickness =" {DynamicResource TextControlBorderThemeThickness}" CornerRadius =" {DynamicResource ControlCornerRadius}" Padding =" {StaticResource TextControlErrorBorderPadding}" >
4878
+ <AdornedElementPlaceholder />
4879
+ </Border >
4880
+ </ControlTemplate >
4875
4881
<Style x : Key =" DefaultTextBoxStyle" TargetType =" {x:Type TextBox}" >
4876
4882
<Setter Property =" FocusVisualStyle" Value =" {x:Null}" />
4883
+ <Setter Property =" Validation.ErrorTemplate" Value =" {DynamicResource DefaultTextBoxInvalidationStyle}" />
4877
4884
<Setter Property =" ContextMenu" Value =" {DynamicResource DefaultControlContextMenu}" />
4878
4885
<Setter Property =" Foreground" Value =" {DynamicResource TextControlForeground}" />
4879
4886
<Setter Property =" CaretBrush" Value =" {DynamicResource TextControlForeground}" />
Original file line number Diff line number Diff line change 78
78
<Thickness x : Key =" DatePickerHostPadding" >0,1,0,2</Thickness >
79
79
<Thickness x : Key =" DatePickerHostMonthPadding" >9,0,0,1</Thickness >
80
80
<Thickness x : Key =" ComboBoxEditableTextPadding" >10,0,30,0</Thickness >
81
+ <Thickness x : Key =" TextControlErrorBorderPadding" >1</Thickness >
81
82
<system : Double x : Key =" ComboBoxMinHeight" >24</system : Double >
82
83
<!-- <Thickness x:Key="ComboBoxPadding">12,1,0,3</Thickness> -->
83
84
<system : Double x : Key =" NavigationViewItemOnLeftMinHeight" >32</system : Double >
4968
4969
</Trigger >
4969
4970
</ControlTemplate .Triggers>
4970
4971
</ControlTemplate >
4972
+ <ControlTemplate x : Key =" DefaultTextBoxInvalidationStyle" >
4973
+ <Border BorderBrush =" {DynamicResource SystemFillColorCriticalBrush}" BorderThickness =" {DynamicResource TextControlBorderThemeThickness}" CornerRadius =" {DynamicResource ControlCornerRadius}" Padding =" {StaticResource TextControlErrorBorderPadding}" >
4974
+ <AdornedElementPlaceholder />
4975
+ </Border >
4976
+ </ControlTemplate >
4971
4977
<Style x : Key =" DefaultTextBoxStyle" TargetType =" {x:Type TextBox}" >
4972
4978
<Setter Property =" FocusVisualStyle" Value =" {x:Null}" />
4979
+ <Setter Property =" Validation.ErrorTemplate" Value =" {DynamicResource DefaultTextBoxInvalidationStyle}" />
4973
4980
<Setter Property =" ContextMenu" Value =" {DynamicResource DefaultControlContextMenu}" />
4974
4981
<Setter Property =" Foreground" Value =" {DynamicResource TextControlForeground}" />
4975
4982
<Setter Property =" CaretBrush" Value =" {DynamicResource TextControlForeground}" />
Original file line number Diff line number Diff line change 78
78
<Thickness x : Key =" DatePickerHostPadding" >0,1,0,2</Thickness >
79
79
<Thickness x : Key =" DatePickerHostMonthPadding" >9,0,0,1</Thickness >
80
80
<Thickness x : Key =" ComboBoxEditableTextPadding" >10,0,30,0</Thickness >
81
+ <Thickness x : Key =" TextControlErrorBorderPadding" >1</Thickness >
81
82
<system : Double x : Key =" ComboBoxMinHeight" >24</system : Double >
82
83
<!-- <Thickness x:Key="ComboBoxPadding">12,1,0,3</Thickness> -->
83
84
<system : Double x : Key =" NavigationViewItemOnLeftMinHeight" >32</system : Double >
4218
4219
</Trigger >
4219
4220
</ControlTemplate .Triggers>
4220
4221
</ControlTemplate >
4222
+ <ControlTemplate x : Key =" DefaultTextBoxInvalidationStyle" >
4223
+ <Border BorderBrush =" {DynamicResource SystemFillColorCriticalBrush}" BorderThickness =" {DynamicResource TextControlBorderThemeThickness}" CornerRadius =" {DynamicResource ControlCornerRadius}" Padding =" {StaticResource TextControlErrorBorderPadding}" >
4224
+ <AdornedElementPlaceholder />
4225
+ </Border >
4226
+ </ControlTemplate >
4221
4227
<Style x : Key =" DefaultTextBoxStyle" TargetType =" {x:Type TextBox}" >
4222
4228
<Setter Property =" FocusVisualStyle" Value =" {x:Null}" />
4229
+ <Setter Property =" Validation.ErrorTemplate" Value =" {DynamicResource DefaultTextBoxInvalidationStyle}" />
4223
4230
<Setter Property =" ContextMenu" Value =" {DynamicResource DefaultControlContextMenu}" />
4224
4231
<Setter Property =" Foreground" Value =" {DynamicResource TextControlForeground}" />
4225
4232
<Setter Property =" CaretBrush" Value =" {DynamicResource TextControlForeground}" />
You can’t perform that action at this time.
0 commit comments