Validation Class
TOC
Collapse the table of content
Expand the table of content

Validation Class

 

Provides methods and attached properties that support data validation.

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

System.Object
  System.Windows.Controls.Validation

Public NotInheritable Class Validation

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticErrors

Gets the collection of all active ValidationError objects on the bound element.

System_CAPS_pubpropertySystem_CAPS_staticErrorTemplate

Gets or sets the ControlTemplate used to generate validation error feedback on the adorner layer.

System_CAPS_pubpropertySystem_CAPS_staticHasError

Gets a value that indicates whether any binding on the binding target element has a ValidationError.

System_CAPS_pubpropertySystem_CAPS_staticValidationAdornerSite

Gets or sets the element that appears to indicate that a validation error occurred on the bound element where this property is set.

System_CAPS_pubpropertySystem_CAPS_staticValidationAdornerSiteFor

Gets or sets the element for which this element appears to indicate that an error occurred.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAddErrorHandler(DependencyObject, EventHandler(Of ValidationErrorEventArgs))

Adds an event handler for the Error attached event to the specified object.

System_CAPS_pubmethodSystem_CAPS_staticClearInvalid(BindingExpressionBase)

Removes all ValidationError objects from the specified BindingExpressionBase object.

System_CAPS_pubmethodSystem_CAPS_staticGetErrors(DependencyObject)

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

System_CAPS_pubmethodSystem_CAPS_staticGetErrorTemplate(DependencyObject)

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

System_CAPS_pubmethodSystem_CAPS_staticGetHasError(DependencyObject)

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

System_CAPS_pubmethodSystem_CAPS_staticGetValidationAdornerSite(DependencyObject)

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

System_CAPS_pubmethodSystem_CAPS_staticGetValidationAdornerSiteFor(DependencyObject)

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

System_CAPS_pubmethodSystem_CAPS_staticMarkInvalid(BindingExpressionBase, ValidationError)

Marks the specified BindingExpression object as invalid with the specified ValidationError object.

System_CAPS_pubmethodSystem_CAPS_staticRemoveErrorHandler(DependencyObject, EventHandler(Of ValidationErrorEventArgs))

Adds an event handler for the Error attached event from the specified object.

System_CAPS_pubmethodSystem_CAPS_staticSetErrorTemplate(DependencyObject, ControlTemplate)

Sets the value of the ErrorTemplate attached property to the specified element.

System_CAPS_pubmethodSystem_CAPS_staticSetValidationAdornerSite(DependencyObject, DependencyObject)

Sets the ValidationAdornerSite attached property to the specified value on the specified element.

System_CAPS_pubmethodSystem_CAPS_staticSetValidationAdornerSiteFor(DependencyObject, DependencyObject)

Sets the ValidationAdornerSiteFor attached property to the specified value on the specified element.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticErrorEvent

Identifies the Error attached event.

System_CAPS_pubfieldSystem_CAPS_staticErrorsProperty

Identifies the Errors attached property.

System_CAPS_pubfieldSystem_CAPS_staticErrorTemplateProperty

Identifies the ErrorTemplate attached property.

System_CAPS_pubfieldSystem_CAPS_staticHasErrorProperty

Identifies the HasError attached property.

System_CAPS_pubfieldSystem_CAPS_staticValidationAdornerSiteForProperty

Identifies the ValidationAdornerSiteFor attached property.

System_CAPS_pubfieldSystem_CAPS_staticValidationAdornerSiteProperty

Identifies the ValidationAdornerSite attached property.

NameDescription
System_CAPS_pubeventSystem_CAPS_staticError

Occurs when the bound element runs into a validation error, but only for bindings with the NotifyOnValidationError value set to true.

For a detailed discussion of the validation process, see "Data Validation" in Data Binding Overview.

.NET Framework
Available since 3.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0

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

Return to top
Show:
© 2016 Microsoft