Skip to main content

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.v23.2.Core.Desktop.dll

NuGet Package: DevExpress.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.

See Also