DatePicker::DisplayDate Property
.NET Framework (current version)
Gets or sets the date to display.
Assembly: PresentationFramework (in PresentationFramework.dll)
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The specified date is not in the range defined by DisplayDateStart. and DisplayDateEnd. |
This property affects the Calendar of the DatePicker. For more information, see the Calendar::DisplayDate property.
Identifier field | |
Metadata properties set to true |
This property allows the developer to specify a date to display if SelectedDate is null.
<DatePicker DisplayDate="dateTimeString"/>
- dateTimeString
A date that is in one of the formats that are listed in the DateTime XAML Syntax topic.
The following example creates a DatePicker that is initialized with its calendar open and displaying July 7, 2009.
<DatePicker IsDropDownOpen="True" IsTodayHighlighted="False" DisplayDate="7/7/09"/>
.NET Framework
Available since 4.0
Silverlight
Available since 2.0
Available since 4.0
Silverlight
Available since 2.0
Show: