HolidaysHelper.GenerateHolidayAppointments(ISchedulerStorageBase, WorkDaysCollection) Method
Creates all-day appointments for the collection of holidays added to the specified SchedulerControl.WorkDays collection of the scheduler.
Namespace: DevExpress.XtraScheduler.Native
Assembly: DevExpress.XtraScheduler.v20.2.Core.Desktop.dll
NuGet Packages: DevExpress.Scheduler.CoreDesktop, DevExpress.WindowsDesktop.Scheduler.CoreDesktop
Declaration
public static AppointmentBaseCollection GenerateHolidayAppointments(
ISchedulerStorageBase storage,
WorkDaysCollection workDays
)
Parameters
Name | Type | Description |
---|---|---|
storage | ISchedulerStorageBase | A ISchedulerStorageBase object. |
workDays | WorkDaysCollection | A WorkDaysCollection object containing information about holidays for which appointments should be generated. |
Returns
Type | Description |
---|---|
AppointmentBaseCollection | An AppointmentBaseCollection collection of generated appointments. |
Remarks
The GenerateHolidayAppointments method creates a collection of all-day appointments of the AppointmentType.Normal type scheduled for holidays contained in the SchedulerControl.WorkDays collection. Each appointment has a subject that is equal to KnownDateDay.DisplayName of the corresponding holiday.
Add appointments to SchedulerStorage to persist and display them in the scheduler.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GenerateHolidayAppointments(ISchedulerStorageBase, WorkDaysCollection) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.