Export (0) Print
Expand All
Expand Minimize

CalendarSelectionMode Enumeration

Specifies whether a single or multiple dates can be selected in a Calendar.

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

public enum class CalendarSelectionMode
<object property="enumerationMemberName" .../>

Member nameDescription
MultipleRangeMultiple non-contiguous ranges of dates can be selected. Use the SelectedDates property to retrieve the selected dates.
NoneNo selections are allowed.
SingleDateA single date can be selected. Use the SelectedDate property to retrieve the selected date.
SingleRangeA single range of dates can be selected. Use the SelectedDates property to retrieve the selected dates.

The following example sets the SelectionMode property to MultipleRange.

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.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

© 2014 Microsoft