Skip to content

Commit ee47890

Browse files
authored
Adding validation error template to the toggle button (#2555)
1 parent 7afb385 commit ee47890

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<Setter Property="Padding" Value="{x:Static wpf:Constants.TextBoxDefaultPadding}" />
6262
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
6363
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
64-
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource MaterialDesignValidationErrorTemplate}" />
64+
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource MaterialDesignValidationErrorTemplate}" />
6565
<Setter Property="wpf:TextFieldAssist.UnderlineBrush" Value="{DynamicResource PrimaryHueMidBrush}" />
6666
<Setter Property="wpf:HintAssist.Foreground" Value="{DynamicResource PrimaryHueMidBrush}" />
6767
<Setter Property="ContextMenu" Value="{StaticResource MaterialDesignDefaultContextMenu}" />

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ToggleButton.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf"
4-
xmlns:system="clr-namespace:System;assembly=mscorlib"
54
xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters">
65

76
<!-- TODO freeze, share -->
@@ -267,6 +266,7 @@
267266
<Setter Property="wpf:ToggleButtonAssist.SwitchTrackOffBackground" Value="Black"/>
268267
<Setter Property="BorderThickness" Value="1"/>
269268
<Setter Property="Padding" Value="0 1 0 0"/>
269+
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource MaterialDesignValidationErrorTemplate}" />
270270
<Setter Property="Template">
271271
<Setter.Value>
272272
<ControlTemplate TargetType="{x:Type ToggleButton}">

0 commit comments

Comments
 (0)