Skip to main content

SchedulerStorage.CreateAppointment(AppointmentType) Method

Creates an appointment of the specified type.

Namespace: DevExpress.Xpf.Scheduler

Assembly: DevExpress.Xpf.Scheduler.v14.2.dll

#Declaration

public Appointment CreateAppointment(
    AppointmentType type
)

#Parameters

Name Type Description
type AppointmentType

A AppointmentType enumeration value specifying the type of the created appointment.

#Returns

Type Description
Appointment

A Appointment object, which specifies an appointment of the specified type.

#Remarks

Use the CreateAppointment method to create an appointment of the specified type. This method also creates all the required custom fields and adds them to the appointment's collection of custom fields, available via the Appointment.CustomFields property. To add custom fields to the appointment manually, use the AppointmentStorage.CreateCustomFields method.

The CreateAppointment method creates an appointment using the appointment factory (an object which implements the DevExpress.XtraScheduler.IAppointmentFactory interface). To change the default appointment factory, implement the IAppointmentFactory interface and specify this object as the appointment factory for the scheduler storage via the SchedulerStorage.SetAppointmentFactory method.

d

After an appointment has been created, it should be added to the scheduler storage to persist and display it in the scheduler control (the AppointmentStorage.Add method). For an example, see the How to: Create Appointments with Various Recurrence Types Programmatically document.

See Also