refactor: massive refactor input elements, step 1/3

This commit is contained in:
NaBian committed 2022-03-13 18:54:34 +08:00
1 parent 1154eabd8d
commit 99d2fafb72
35 files changed
+1213 -1460

No files matched your search

@@ -0,0 +1,19 @@
using System.Globalization;
using System.Windows.Controls;
namespace HandyControlDemo.Tools;
public class NumericUpDownDemoRule : ValidationRule
{
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
{
if (value is not double doubleValue)
{
return new ValidationResult(false, HandyControl.Properties.Langs.Lang.FormatError);
}
return doubleValue % 2 > double.Epsilon
? new ValidationResult(false, Properties.Langs.Lang.Error)
: ValidationResult.ValidResult;
}
}