hc:DatePicker support for Validation

This commit is contained in:
NaBian committed 2021-07-18 14:25:53 +08:00
1 parent ac8b5561a5
commit 13d9404848
6 files changed
+23 -9

No files matched your search

@@ -120,7 +120,7 @@ namespace HandyControl.Controls
Value = 0;
SetCurrentValue(ErrorStrProperty, string.Empty);
SetCurrentValue(IsErrorProperty, false);
SetCurrentValue(IsErrorProperty, ValueBoxes.FalseBox);
}
else if (double.TryParse(_textBox.Text, out var value))
{
@@ -129,7 +129,7 @@ namespace HandyControl.Controls
if (Validation.GetHasError(this))
{
SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent);
SetCurrentValue(IsErrorProperty, true);
SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
}
}
@@ -513,7 +513,7 @@ namespace HandyControl.Controls
}
SetCurrentValue(ErrorStrProperty, result.Message);
SetCurrentValue(IsErrorProperty, !result.Data);
SetCurrentValue(IsErrorProperty, ValueBoxes.BooleanBox(!result.Data));
return result.Data;
}
}