Show / Hide Table of Contents

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
System.Object
ValidationError
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
public class ValidationError

Constructors

| Improve this Doc View Source

ValidationError(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 Source

BindingInError

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
  • Improve this Doc
  • View Source