SelectionMode Property

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)

public CalendarSelectionMode SelectionMode { get; set; }

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.

<Calendar SelectionMode="CalendarSelectionMode"/>

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

.NET Framework
Available since 4.0
Available since 2.0
Return to top
© 2015 Microsoft