Gets the text that is displayed by the DatePicker, or sets the selected date.
Assembly: PresentationFramework (in PresentationFramework.dll)
A user can set the SelectedDate of a DatePicker by typing a date into its text box. The DatePicker attempts to parse any string entered into this property as a date. While the property can be set to any string that can be parsed by the Parse method date, the format of the string that is returned depends on the value of the CultureInfo.CurrentCulture property. This means that the DatePicker might display a string that is different than what the user typed.
The following example creates a DatePicker that has the date August 10, 2009 selected. The example also binds the property to a TextBlock. Because the SelectedDateFormat property is set to Long, the DatePicker and TextBlock displays the date using unabbreviated days of the week and month names even if the user enters a short form of a date.
Available since 4.0
Available since 2.0