ComponentOne Scheduler for WPF and Silverlight
C1Scheduler Task-Based Help / C1Scheduler Tasks / Adding Holidays to the C1Scheduler
In This Topic
    Adding Holidays to the C1Scheduler
    In This Topic

    You can add holidays to the C1Scheduler control using the CalendarHelper.Holidays property. This property can not be set in XAML; it can only be set in code.

    Use the following code to add holidays to the  C1Scheduler:

    XAML
    Copy Code
    sched1.CalendarHelper.Holidays.Add(new DateTime(2013, 1, 1));
    sched1.CalendarHelper.Holidays.Add(new DateTime(2012, 12, 25));
    sched1.CalendarHelper.Holidays.Add(new DateTime(2012, 12, 31));
    

    This topic illustrates the following:

    The C1Scheduler control will not allow the user to create an appointment on a day designated as a holiday: