DatePicker.SelectedDateFormat Property

 

Gets or sets the format that is used to display the selected date.

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

member SelectedDateFormat : DatePickerFormat with get, set

Property Value

Type: System.Windows.Controls.DatePickerFormat

The format that is used to display the selected date. The default is Long.

Exception Condition
ArgumentOutOfRangeException

The specified format is not valid.

Identifier field

SelectedDateFormatProperty

Metadata properties set to true

None

<DatePicker SelectedDateFormat="DatePickerFormat"/>

The following example creates that DatePicker that displays the date using unabbreviated days of the week and month names.

No code example is currently available or this language may not be supported.
<!-- A DatePicker that has March 23, 2009 selected and 
           displays the Long date format. -->
<DatePicker SelectedDateFormat="Long" SelectedDate="3/23/09"
                  DisplayDateStart="1/01/09" DisplayDateEnd="12/31/09" 
                  FirstDayOfWeek="Monday"/>

.NET Framework
Available since 4.0
Silverlight
Available since 2.0
Return to top
Show: