input elements support for Validation
This commit is contained in:
1 parent
1d0744b348
commit
b7663e3e75
4 files changed
+54
-5
No files matched your search
@@ -258,9 +258,21 @@ namespace HandyControl.Controls
|
||||
result = OperationResult.Success();
|
||||
}
|
||||
|
||||
IsError = !result.Data;
|
||||
ErrorStr = result.Message;
|
||||
return result.Data;
|
||||
var isError = !result.Data;
|
||||
if (isError)
|
||||
{
|
||||
SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
|
||||
SetCurrentValue(ErrorStrProperty, result.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
isError = Validation.GetHasError(this);
|
||||
if (isError)
|
||||
{
|
||||
SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent);
|
||||
}
|
||||
}
|
||||
return !isError;
|
||||
}
|
||||
|
||||
private static void OnShowPasswordChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
|
||||
Reference in new issue
Block a user