Class ValidationError
Represents a validation error that is created either by the binding engine when a System.Windows.Controls.ValidationRule reports a validation error, or through the System.Windows.Controls.Validation.MarkInvalid(System.Windows.Data.BindingExpressionBase,System.Windows.Controls.ValidationError) method explicitly.
Inheritance
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
public class ValidationError
Constructors
| Improve this Doc View SourceValidationError(Object)
Initializes a new instance of the System.Windows.Controls.ValidationError class with the specified parameters.
Declaration
public ValidationError(object bindingInError)
Parameters
Type | Name | Description |
---|---|---|
System.Object | bindingInError | The System.Windows.Data.BindingExpression or System.Windows.Data.MultiBindingExpression object with the validation error. |
Properties
| Improve this Doc View SourceBindingInError
Gets the System.Windows.Data.BindingExpression or System.Windows.Data.MultiBindingExpression object of this System.Windows.Controls.ValidationError. The object is either marked invalid explicitly or has a failed validation rule.
Declaration
public object BindingInError { get; }
Property Value
Type | Description |
---|---|
System.Object |
ErrorContent
Gets or sets an object that provides additional context for this System.Windows.Controls.ValidationError, such as a string describing the error.
Declaration
public object ErrorContent { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Exception
Gets or sets the System.Exception object that was the cause of this System.Windows.Controls.ValidationError, if the error is the result of an exception.
Declaration
public Exception Exception { get; set; }
Property Value
Type | Description |
---|---|
System.Exception |