This documentation is archived and is not being maintained.

Calendar::SelectionMode Property

Gets or sets a value that indicates what kind of selections are allowed.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

property CalendarSelectionMode SelectionMode {
	CalendarSelectionMode get ();
	void set (CalendarSelectionMode value);
<Calendar SelectionMode="CalendarSelectionMode"/>

Property Value

Type: System.Windows.Controls::CalendarSelectionMode
A value that indicates the current selection mode. The default is SingleDate.

Identifier field


Metadata properties set to true


This property determines whether the Calendar allows no selection, selection of a single date, or selection of multiple dates. The selection mode is specified with the CalendarSelectionMode enumeration.

When this property is changed, all selected dates will be cleared.

The following example creates a Calendar that has multiple ranges of dates selected.

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

<!-- Create a Calendar that displays dates through
     Januarary 31, 2009 and has dates that are not selectable. -->
<Calendar Margin="20" SelectionMode="MultipleRange"  

    <CalendarDateRange Start="1/2/2009" End="1/4/2009"/>
    <CalendarDateRange Start="1/9/2009" End="1/9/2009"/>
    <CalendarDateRange Start="1/16/2009" End="1/16/2009"/>
    <CalendarDateRange Start="1/23/2009" End="1/25/2009"/>
    <CalendarDateRange Start="1/30/2009" End="1/30/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.