Export (0) Print
Expand All

Validation Members

Provides methods and attached properties that support data validation. This class cannot be inherited.

The following tables list the members exposed by the Validation type.

  Name Description
Public field Static ErrorEvent Identifies the Validation.Error attached event.
Public field Static ErrorsProperty Identifies the Validation.Errors attached property.
Public field Static ErrorTemplateProperty Identifies the ErrorTemplate attached property.
Public field Static HasErrorProperty Identifies the HasError attached property.
Top

  Name Description
Public property Errors Gets the collection of all active ValidationError objects on the bound element.
Public property ErrorTemplate Gets or sets the ControlTemplate used to generate validation error feedback on the adorner layer.
Public property HasError Gets a value that indicates whether any binding on the binding target element has a ValidationError.
Top

(see also Protected Methods )
  Name Description
Public method Static AddErrorHandler Adds an event handler for the Validation.Errorattached event to the specified object.
Public method Static ClearInvalid Removes all ValidationError objects from the specified BindingExpressionBase object.
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method Static GetErrors Gets the value of the Errors attached property of the specified element.
Public method Static GetErrorTemplate Gets the value of the ErrorTemplate attached property of the specified element.
Public method Static GetHasError Gets the value of the HasError attached property of the specified element.
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method Static MarkInvalid Marks the specified BindingExpression object as invalid with the specified ValidationError object.
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Static RemoveErrorHandler Adds an event handler for the Validation.Errorattached event from the specified object.
Public method Static SetErrorTemplate Sets the value of the ErrorTemplate attached property to the specified element.
Public method ToString  Returns a String that represents the current Object. (inherited from Object)
Top

  Name Description
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)
Top

  Name Description
Public event Static Error Occurs when the bound element runs into a validation error, but only for bindings with the NotifyOnValidationError value set to true.
Top

Community Additions

ADD
Show:
© 2014 Microsoft