Files
HandyControl/HandyControlDemo/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs
T
NaBian 0b80e7ddec add NumericUpDownPlus style
now you can clear, verify the value of NumericUpDown
2018-11-07 16:54:33 +08:00

20 lines
582 B
C#

using HandyControl.Data;
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
public partial class NumericUpDownDemoCtl
{
public NumericUpDownDemoCtl()
{
InitializeComponent();
NumericUpDownCustomVerify.VerifyFunc = str => double.TryParse(str, out var v)
? v % 2 < 1e-06
? OperationResult.Failed(Properties.Langs.Lang.Error)
: OperationResult.Success()
: OperationResult.Failed(Properties.Langs.Lang.Error);
}
}
}