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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈