hc:NumericUpDown support for Validation

This commit is contained in:
NaBian committed 2021-07-18 14:11:19 +08:00
1 parent 697b5e0014
commit ac8b5561a5
2 files changed
+24 -6

No files matched your search

@@ -21,6 +21,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="hc:NumericUpDown">
@@ -285,6 +286,7 @@
</ControlTemplate>
<Style x:Key="NumericUpDownPlusBaseStyle" BasedOn="{StaticResource NumericUpDownExtendBaseStyle}" TargetType="hc:NumericUpDown">
<Setter Property="IsError" Value="{Binding Path=(Validation.HasError),RelativeSource={RelativeSource Self}}"/>
<Setter Property="Template" Value="{StaticResource NumericUpDownPlusTopTemplate}"/>
<Style.Triggers>
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">