GetErrors Method
Collapse the table of content
Expand the table of content

Validation.GetErrors Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the value of the Errors attached property for the specified element.

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

public static ReadOnlyObservableCollection<ValidationError> GetErrors(
	DependencyObject element
)

Parameters

element
Type: System.Windows.DependencyObject
The element to retrieve the errors for.

Return Value

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

ExceptionCondition
ArgumentNullException

element is null.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2018 Microsoft