Calendar.DisplayDate 속성

정의

표시할 날짜를 가져오거나 설정합니다.

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

속성 값

DateTime

표시할 날짜입니다. 기본값은 Today입니다.

예제

다음 코드에서는 설정 된 Calendar 표시할 수 있는 날짜 및 현재 선택 되 고 표시 된 날짜 집합의 특정 범위를 사용 하 여 합니다.

// Create a Calendar that displays 1/10/2009
// through 4/18/2009.
Calendar basicCalendar = new Calendar();
basicCalendar.DisplayDateStart = new DateTime(2009, 1, 10);
basicCalendar.DisplayDateEnd = new DateTime(2009, 4, 18);
basicCalendar.DisplayDate = new DateTime(2009, 3, 15);
basicCalendar.SelectedDate = new DateTime(2009, 2, 15);

// root is a Panel that is defined elswhere.
root.Children.Add(basicCalendar);
' Create a Calendar that displays 1/10/2009 
' through 4/18/2009. 
Dim basicCalendar As New Calendar()
basicCalendar.DisplayDateStart = New DateTime(2009, 1, 10)
basicCalendar.DisplayDateEnd = New DateTime(2009, 4, 18)
basicCalendar.DisplayDate = New DateTime(2009, 3, 15)
basicCalendar.SelectedDate = New DateTime(2009, 2, 15)

' root is a Panel that is defined elswhere. 
root.Children.Add(basicCalendar)
<!-- Create a Calendar that displays 1/10/2009
           through 4/18/2009. -->
<Calendar Margin="20" 
          SelectedDate="2/15/2009"
          DisplayDate="3/15/2009"
          DisplayDateStart="1/10/2009"
          DisplayDateEnd="4/18/2009"/>

설명

합니다 DisplayDateDisplayMode 달력에서 표시 하는 내용 및 일정 내에서 포커스가 어떤 속성을 지정 합니다. 사용자가 변경할 수는 SelectedDate 경우에만 DisplayMode 월으로 설정 된 사용자가 변경할 수 있지만 DisplayDate 달력 연도 및 10 년 모드인 경우. 다음 표에서 모드를 변경 하는 방법을 설명 합니다 DisplayDate합니다.

DisplayMode 작업
DisplayDate 사용자가 다른 달으로 이동할 때 변경 됩니다.
Year 월을 DisplayDate 사용자가 클릭 하거나 다른 달으로 이동 하는 경우 변경 합니다.
10 년 연도 DisplayDate 사용자가 클릭 하거나 다른 연도를 탐색 하는 경우 변경 합니다.

DisplayDate 지정 된 날짜의 범위를 벗어난 값이 무시 됩니다 DisplayDateStartDisplayDateEnd 속성입니다.

종속성 속성 정보

식별자 필드 DisplayDateProperty
메타 데이터 속성 설정 true BindsTwoWayByDefault

XAML 특성 사용

<Calendar DisplayDate="dateTimeString"/>  

XAML 값

dateTimeString
에 나열 된 형식 중 하나에 있는 날짜를 DateTime XAML 구문 항목입니다.

적용 대상