C1Scheduler provides one supplementary calendar control: C1Calendar.
The C1Calendar control is used to create a one-month or multiple month calendar user interface. It enables users to select a specific date(s) interactively.
The purpose of the calendar control is to provide data that helps to create the calendar user interface (without code, solely in XAML) with an ability to select a specific date interactively. The main properties that express this purpose are:
Main Calendar Properties
Property |
Description |
CalendarBase.SelectedDate DateTime SelectedDate {get; set;} |
Defines a current date that is selected in calendar. |
CalendarBase.Year int Year {get; set;} |
Defines a year component of the C1.WPF.Schedule.CalendarBase.SelectedDate property. |
CalendarBase.Month int Month {get; set;} |
Defines a month that is represented by a calendar. |
CalendarBase.MaxDate DateTime MaxDate {get; set;} |
Gets or sets the maximum allowable date. The default value is 12/31/9998. |
CalendarBase.MinDate TimeSpan MinDate {get; set;} |
Gets or sets the minimum allowable date. The default value is 01/01/1753. |
These properties are being kept in synch, so changing the DateTime changes the Year and Month appropriately and vice versa.
Other Calendar Properties
Property |
Description |
CalendarBase.CalendarHelper, public C1.WPF.Schedule.CalendarHelper CalendarHelper {get; set;} |
Provides calendar-dependant properties. |
C1Calendar.MaxSelectionCount, public int MaxSelectionCount {get; set;} |
Defines the maximum number of days that can be selected in the control. |
C1Calendar.SelectedDates, public C1.WPF.Schedule.DateList SelectedDates {get; set;} |
The list of selected dates. |
C1Calendar.BoldedDates, public C1.WPF.Schedule.DateList BoldedDates {get; set;} |
The list of bolded dates. |
CalendarBase.DaysPanel, public System.Windows.Controls.ItemsPanelTemplate DaysPanel {get; set;} |
An ItemsPanelTemplate that defines the panel that lays out elements representing days of a month. By default the AutoDistributionGrid panel with 7 columns and 6 rows is used. |
CalendarBase.DaySlotTemplate, public System.Windows.DataTemplate DaySlotTemplate {get; set;} |
A DataTemplate that defines a UI representation of a single day of a month. A DataContext for this template is a DaySlot object. |
CalendarBase.DaySlotStyle, public System.Windows.Style DaySlotStyle {get; set;} |
A Style for DaySlotPresenter elements which are the root elements of a visual tree representing a single day of a month. |
CalendarBase.DaysOfWeekPanel, public System.Windows.Controls.ItemsPanelTemplate DaysOfWeekPanel {get; set;} |
An ItemsPanelTemplate that defines the panel that lays out elements representing days of week. By default the StackPanel with horizontal orientation is used. |
CalendarBase.DayOfWeekSlotTemplate, public System.Windows.DataTemplate DayOfWeekSlotTemplate {get; set;} |
A DataTemplate that defines a UI representation of a single day of week. A DataContext for this template is a DayOfWeekSlot object. |
C1CalendarItem.MonthFullName, public string MonthFullName { get; } |
Gets a full name of a month currently represented by calendar taking into account current culture. |
CalendarBase.Theme, public System.Windows.ResourceDictionary Theme {get; set;} |
Gets or sets a ResourceDictionary object containing calendar theme resources. |
All controls expose the following RoutedEvent:
Event |
Description |
CalendarBase.SelectedDateChanged |
Occurs when the C1.WPF.Schedule.CalendarBase.SelectedDate property value has been changed. |