Validation.Errors Attached Property

Gets a collection of ValidationError objects associated with the binding target element.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

See GetErrors
See Remarks

Property Value

Type: System.Collections.ObjectModel.ReadOnlyObservableCollection<ValidationError>
A collection of ValidationError objects associated with the binding target element.

The Validation.Errors attached property is not used directly in XAML for attribute setting. You do not ever populate a <Validation.Errors> property element on an object with ValidationError instances in XAML. The Validation.Errors property is populated with a ReadOnlyObservableCollection<T> of ValidationError instances as part of the behavior of the binding validation system.

Validation.Errors might be referenced in XAML as part of a binding property path for another property. For example, if a template defines the visual state of error handling, the template might expose properties of the ValidationError.Exception as part of the UI presented in another property and would specify (Validation.Errors) as the start of the property path.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft