Validation.GetHasError 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 HasError attached property for the specified element.
Assembly: System.Windows (in System.Windows.dll)
Parameters
- element
- Type: System.Windows.DependencyObject
The element to check for errors.
Return Value
Type: System.Booleantrue if any binding on the specified element has a validation error; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentNullException | element is Nothing. |
Show: