Back to Devexpress

HolidaysHelper.CreateHolidayAppointment(Holiday, ISchedulerStorageBase) Method

corelibraries-devexpress-dot-xtrascheduler-dot-native-dot-holidayshelper-dot-createholidayappointment-x28-devexpress-dot-schedule-dot-holiday-devexpress-dot-xtrascheduler-dot-ischedulerstoragebase-x29.md

latest3.1 KB
Original Source

HolidaysHelper.CreateHolidayAppointment(Holiday, ISchedulerStorageBase) Method

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

Namespace : DevExpress.XtraScheduler.Native

Assembly : DevExpress.XtraScheduler.v25.2.Core.Desktop.dll

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
public static Appointment CreateHolidayAppointment(
    Holiday holiday,
    ISchedulerStorageBase storage
)
vb
Public Shared Function CreateHolidayAppointment(
    holiday As Holiday,
    storage As ISchedulerStorageBase
) As Appointment

Parameters

NameTypeDescription
holidayHoliday

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

TypeDescription
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

HolidaysHelper Class

HolidaysHelper Members

DevExpress.XtraScheduler.Native Namespace