Validation.GetHasError Method (DependencyObject)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the value of the HasError attached property of the specified element.

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

public static bool GetHasError(
	DependencyObject element
)

Parameters

element
Type: System.Windows.DependencyObject

The UIElement or ContentElement object to read the value from.

Return Value

Type: System.Boolean

The value of the HasError attached property of the specified element.

Exception Condition
ArgumentNullException

If element is null.

.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: