Provides data for the DatePicker::DateValidationError event.
Assembly: PresentationFramework (in PresentationFramework.dll)
Initializes a new instance of theclass.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
The DatePicker::DateValidationError event occurs when DatePicker::Text is set to a value that cannot be interpreted as a date or when the date cannot be selected. You can subscribe to this event and specify whether an exception is raised by setting the ThrowException property. If DatePickerDateValidationErrorEventArgs::ThrowException is true, one of the following exceptions is raised:
The text entered cannot be parsed to a valid date, and the exception is not suppressed.
The text entered parses to a date that is not selectable.
If DatePickerDateValidationErrorEventArgs::ThrowException is false, the application continues execution as usual.
The following example creates a DatePicker that displays the dates in August 2009 and specifies that each Saturday and Sunday is not selectable. The DatePicker handles the DateValidationError event. If the user enters a date that is not selectable, the example displays a message. If the user enters text that is not a valid date, an exception is thrown.
Available since 4.0
Available since 2.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.