'Declaration Public Event EditModeValidationError As EventHandler(Of EditModeValidationErrorEventArgs)
public event EventHandler<EditModeValidationErrorEventArgs> EditModeValidationError
The event handler receives an argument of type EditModeValidationErrorEventArgs containing data related to this event. The following EditModeValidationErrorEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Editor | Gets the associated value editor. |
ErrorMessage | Gets or sets the error message. |
Exception | Gets any exception associated with the validation error. |
ForceExitEditMode | Indicates if the edit mode is being exitted forcefully. For example, when the application is being closed. |
Handled (Inherited from System.Windows.RoutedEventArgs) | Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. |
InvalidValueBehavior | Gets or sets the invalid value behavior. |
OriginalSource (Inherited from System.Windows.RoutedEventArgs) | Gets the original reporting source as determined by pure hit testing, before any possible System.Windows.RoutedEventArgs.Source adjustment by a parent class. |
RoutedEvent (Inherited from System.Windows.RoutedEventArgs) | Gets or sets the System.Windows.RoutedEventArgs.RoutedEvent associated with this System.Windows.RoutedEventArgs instance. |
Source (Inherited from System.Windows.RoutedEventArgs) | Gets or sets a reference to the object that raised the event. |
The editor validates the user input when the user attempts to leave the control after modifying the value of the editor. EditModeValidationError event is raised if the modified value is invalid. The editor considers a value invalid if the entered text can not be parsed into ValueType or it does not satisfy all the constraints specified by the ValueConstraint.
See InvalidValueBehavior and IsValueValid for more information.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
ValueEditor Class
ValueEditor Members
ValueConstraint Property
IsValueValid Property
InvalidValueBehavior Property
OnEditModeValidationError Method
StartEditMode Method
EndEditMode Method
EditModeStarting Event
EditModeEnding Event
EditModeEnded Event
EditModeValidationErrorEvent Field
EditModeValidationErrorEventArgs Class