input elements support for Validation

This commit is contained in:
NaBian committed 2021-07-18 15:02:42 +08:00
1 parent 1d0744b348
commit b7663e3e75
4 files changed
+54 -5

No files matched your search

@@ -20,6 +20,7 @@
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="PasswordBox">
@@ -272,6 +273,8 @@
</ControlTemplate>
<Style x:Key="PasswordBoxPlusBaseStyle" TargetType="hc:PasswordBox">
<Setter Property="IsError" Value="{Binding Path=(Validation.HasError),RelativeSource={RelativeSource Self}}"/>
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>