GanttView for WPF | ComponentOne
Customization / Add Vacation Day for Resource
In This Topic
    Add Vacation Day for Resource
    In This Topic

    GanttView not only allows you to add resources for your tasks but also facilitates you to manage vacation days for your resources. Adding resource's vacation days to the project schedule is necessary as it helps in tracking the impact of vacation days on the productivity of the tasks.

    To add a vacation day for your resource, follow the given steps:

    1. Create a custom calendar using the CustomCalendar class.
      C#
      Copy Code
      CustomCalendar Calendar1 = new CustomCalendar();
      
    2. Add a calendar exception using CalendarException class and set its properties. This code sets the WeekDays and WeekOfMonth properties of the RecurrencePattern class that specifies recurrence pattern for the vacation.
      C#
      Copy Code
      CalendarException c1 = new CalendarException();
      c1.Name = "My Holiday";
      c1.RecurrencePattern.WeekOfMonth = WeekOfMonth.Fourth;
      c1.RecurrencePattern.WeekDays = WeekDays.Monday;
      Calendar1.CalendarExceptions.Add(c1);   
      

    This adds a vacation day for you resource in GanttView.