DatePicker.DisplayDate Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the date to display.
public:
property DateTime DisplayDate { DateTime get(); void set(DateTime value); };
public DateTime DisplayDate { get; set; }
member this.DisplayDate : DateTime with get, set
Public Property DisplayDate As DateTime
Property Value
The date to display. The default is Today.
Exceptions
The specified date is not in the range defined by DisplayDateStart. and DisplayDateEnd.
Examples
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"/>
Remarks
This property affects the Calendar of the DatePicker. For more information, see the Calendar.DisplayDate property.
Dependency Property Information
Identifier field | DisplayDateProperty |
Metadata properties set to true |
BindsTwoWayByDefault |
This property allows the developer to specify a date to display if SelectedDate is null
.
XAML Attribute Usage
<DatePicker DisplayDate="dateTimeString"/>
XAML Values
dateTimeString
A date that is in one of the formats that are listed in the DateTime XAML Syntax topic.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om