Export (0) Print
Expand All

Calendar.DisplayDateStart Property

Gets or sets the first date that is available in the calendar.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

member DisplayDateStart : Nullable<DateTime> with get, set

<Calendar DisplayDateStart="dateTimeString"/>

XAML Values

dateTimeString

A date that is in one of the formats that are listed in the DateTime XAML Syntax topic.

Property Value

Type: System.Nullable(DateTime)
The first date that is available in the calendar. The default is a null reference (Nothing in Visual Basic).

You can restrict the range of a Calendar by setting the DisplayDateStart and DisplayDateEnd properties. A user cannot scroll to or select dates outside of this range. If you set the SelectedDate property to a date that is before DisplayDateStart, DisplayDateStart is set to the same value as SelectedDate.

The following code sets up a Calendar with a particular range of displayable dates, and sets the currently selected and displayed date.

No code example is currently available or this language may not be supported.

<!-- 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"/>


.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft