ValidationError Class

May 11, 2014

Represents a validation error that is generated by the binding engine when an exception occurs during target-to-source updates.


Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

public class ValidationError

The ValidationError type exposes the following members.

Public propertyErrorContentGets the error message.
Public propertyExceptionGets the exception that caused the validation error.

Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

The validation error can occur when the data source is updated from the target in TwoWay bindings. A ValidationError object is created by the binding engine and included in ValidationErrorEventArgs when the BindingValidationError event is handled.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

© 2014 Microsoft