ghost1372 / HandyControls

Contains some simple and commonly used WPF controls based on HandyControl
https://ghost1372.github.io/
MIT License
1.07k stars 102 forks source link

hc:NumericUpDown 中不支持数据校验吗? #224

Open LiuChao19940201 opened 3 months ago

LiuChao19940201 commented 3 months ago

Feature request type

sample request

Is your feature request related to a problem? Please describe

                                        <hc:NumericUpDown hc:InfoElement.Title="积分时间" 
                                                          Value="{Binding HomeModels.UpperReflexMeasParam.IntegralTime, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" 
                                                          Style="{StaticResource MyNumericUpDownPlus}"
                                                          Padding="0" BorderThickness="1" Opacity="0.8" BorderBrush="Gray"
                                                          Width="130" Height="30" FontSize="20" Margin="10 0 0 0"
                                                          Validation.ErrorTemplate="{StaticResource TextBoxErrorTemplate}">
                                            <hc:NumericUpDown.Resources>
                                                <Style TargetType="hc:NumericUpDown" BasedOn="{StaticResource MyNumericUpDownPlus}">
                                                    <Setter Property="Validation.ErrorTemplate" Value="{StaticResource TextBoxErrorTemplate}" />
                                                    <Setter Property="Width" Value="130" />
                                                </Style>
                                            </hc:NumericUpDown.Resources>
                                        </hc:NumericUpDown>

微信图片_20240611105029

Describe the solution you'd like

在输入框中可以自定义错误数据校验格式,但还是在hc:NumericUpDown中却不行??

Describe alternatives you've considered

No response

Additional context

No response