Calendar.DisplayDateEnd プロパティ

定義

予定表で使用できる日付範囲の最後の日付を取得または設定します。

public:
 property Nullable<DateTime> DisplayDateEnd { Nullable<DateTime> get(); void set(Nullable<DateTime> value); };
public DateTime? DisplayDateEnd { get; set; }
member this.DisplayDateEnd : Nullable<DateTime> with get, set
Public Property DisplayDateEnd As Nullable(Of DateTime)

プロパティ値

Nullable<DateTime>

予定表で使用できる最後の日付。

次のコードは、 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"/>

注釈

a のCalendar範囲を制限する場合は、プロパティをDisplayDateEndDisplayDateStart設定します。 ユーザーは、この範囲外の日付までスクロールしたり、日付を選択したりすることはできません。 プロパティを SelectedDateDisplayDateEndの日付に設定した場合は、 DisplayDateEnd 次と SelectedDate同じ値に設定されます。

依存プロパティ情報

識別子フィールド DisplayDateEndProperty
に設定されたメタデータ プロパティ true BindsTwoWayByDefault

XAML 属性の使用方法

<Calendar DisplayDateEnd="dateTimeString"/>  

XAML 値

dateTimeString
DateTime XAML 構文のトピックに記載されているいずれかの形式の日付。

適用対象

こちらもご覧ください