The xamCalendar™ control provides functionality similar to that of the Microsoft Vista Common Controls Calendar class. The xamCalendar™ control is designed to show one or more CalendarItemGroup items (Figure 3 below). These groups can display Days, Months, Years, Decades or Centuries based on the CurrentMode property of the control. The control allows the user to:
Navigate - by clicking the arrows in the header area
Zoom in and out - by clicking on the CalendarItemGroupTitle (zoom out) or on the CalendarItems (zoom in) thus changing the CurrentMode
Select – by selecting one or more CalendarItems. This functionality is available when the CurrentMode= MinCalendarMode. Otherwise the control will zoom in.
Figure 1: Sample implementation of xamCalendar
The xamCalendar control has the following main features:
multiple calendars
different views
single/multiple date selection
Each of them is explained in details below.
The xamCalendar can display one or more CalendarItemGroups:
Figure 2: A CalendarItemGroup
Note: All CalendarItemGroups in one control use the same zoom mode that is set on the xamCalendar control. If you need to show CalendarItemGroups in different zoom modes you should have multiple xamCalendar controls.
The CalendarItemGroups can display the following views (Figure 3):
Day View (default)
Month View
Year View
Decade View
Century View
Figure 3: The xamCalendar Views
The views are managed by the CurrentMode property of the xamCalendar control.
Figure 4: CalendarItemGroup Elements in Day View
By clicking the header in the CalendarItemGroupTitle, the user can zoom out to view months within years, years within decades, decades within centuries or centuries within millennia. By clicking on a CalendarItem (Figure 3), the user can zoom in until days within months are displayed.
The xamCalendar control supports single date selection, as well as multiple date selection. You control this behavior by setting the SelectionMode property. You get the current selection from SelectedDates and SelectedDate properties.