Calendar Settings
The C1Scheduler, C1MonthCalendar and C1MultiMonthCalendar controls share the same set of calendar settings. These settings are accessible via the corresponding properties of the CalendarHelper class. For example, you can create a work week calendar by specifying the work days through the CalendarHelper class. Notice that the XAML for the CalendarHelper class is the same for all three controls.
XAML for C1Scheduler
<my:C1Scheduler x:Name="scheduler1">
<my:C1Scheduler.CalendarHelper>
<my:CalendarHelper Culture="English " WeekStart="Sunday"
EndDayTime="18:20:00" StartDayTime="09:20:00"
WorkDays="Tuesday,Wednesday,Thursday,Friday,Saturday">
</my:CalendarHelper>
</my:C1Scheduler.CalendarHelper>
</my:C1Scheduler>
XAML for C1MonthCalendar
<my:C1MonthCalendar x:Name="scheduler1">
<my:C1MonthCalendar.CalendarHelper>
<my:CalendarHelper Culture="English " WeekStart="Sunday"
EndDayTime="18:20:00" StartDayTime="09:20:00"
WorkDays="Tuesday,Wednesday,Thursday,Friday,Saturday">
</my:CalendarHelper>
</my:C1MonthCalendar.CalendarHelper>
</my:C1MonthCalendar>
XAML for C1MultiMonthCalendar
<my:C1MultiMonthCalendar x:Name="scheduler1">
<my:C1MultiMonthCalendar.CalendarHelper>
<my:CalendarHelper Culture="English " WeekStart="Sunday"
EndDayTime="18:20:00" StartDayTime="09:20:00"
WorkDays="Tuesday,Wednesday,Thursday,Friday,Saturday">
</my:CalendarHelper>
</my:C1MultiMonthCalendar.CalendarHelper>
</my:C1MultiMonthCalendar>
You can set CalendarHelper properties for one control and use them in several controls. This can be done by binding the CalendarHelper properties of corresponding controls to each other. For example, suppose you have a C1Scheduler control with the previously specified CalendarHelper properties and a C1MultiMonthCalendar control with no properties specified yet in your window. Set the C1MultiMonthCalendar CalendarHelper properties as in the following XAML:
<my:C1MultiMonthCalendar Name="calendar1"
CalendarHelper="{Binding ElementName=scheduler1, Path=CalendarHelper, Mode=OneWay}"/>
The C1MultiMonthCalendar will display all of the CalendarHelper properties specified for the C1Scheduler control.
The following calendar settings are available:
CalendarHelper Property |
Description |
Culture |
Gets or sets the CultureInfo object which holds culture-specific information. |
WeekStart |
Gets or sets the DayOfWeek value determining the first day of the week. The default is system settings. |
WorkDays |
Gets or sets the WorkDays object containing the set of working days in one week. |
StartDayTime |
Gets or sets the TimeSpan value specifying the beginning of the working time. |
EndDayTime |
Gets or sets the TimeSpan value specifying the end of the working time. |
Holidays |
Gets or sets ObservableCollection<DateTime> object which holds the list of holidays (non-working days in addition to weekends). |
WeekendExceptions |
Gets or sets the ObservableCollection<DateTime> object which holds the list of weekend days which should be working. |
FullMonthNames |
Gets an array of culture specific full month names. |
|