Skip to main content

HolidaysHelper.CreateHolidayAppointment(Holiday, ISchedulerStorageBase) Method

Creates a new all-day appointment scheduled for the specified holiday.

Namespace: DevExpress.XtraScheduler.Native

Assembly: DevExpress.XtraScheduler.v24.1.Core.Desktop.dll

NuGet Package: DevExpress.Scheduler.CoreDesktop

Declaration

public static Appointment CreateHolidayAppointment(
    Holiday holiday,
    ISchedulerStorageBase storage
)

Parameters

Name Type Description
holiday Holiday

A Holiday object which specifies a day that is recognized as a holiday.

storage ISchedulerStorageBase

A SchedulerStorageBase object required for creating an appointment instance.

Returns

Type Description
Appointment

An Appointment object which specifies the newly created appointment.

Remarks

The CreateHolidayAppointment method creates an appointment instance of the AppointmentType.Normal type. The holiday’s KnownDateDay.Date value is assigned to Appointment.Start. The appointment’s subject and location (Appointment.Subject and Appointment.Location) are set to the values of the KnownDateDay.DisplayName and Holiday.Location properties of the specified Holiday object.

The appointment should be added to SchedulerStorage to be persisted and displayed in the scheduler.

See Also