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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기