corelibraries-devexpress-dot-xtrascheduler-dot-appointment-f2ceba11.md
Gets the type of an appointment.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
AppointmentType Type { get; }
ReadOnly Property Type As AppointmentType
| Type | Description |
|---|---|
| AppointmentType |
An AppointmentType enumeration value which specifies the appointment’s type.
|
Available values:
| Name | Description |
|---|---|
| Normal |
Represents a standard (non-recurring) appointment.
| | Pattern |
Represents the appointment which serves as the pattern for the other recurring appointments. The pattern for recurring appointments is specified via the Appointment.RecurrenceInfo property.
| | Occurrence |
Represents a recurring appointment whose pattern appointment is specified via the Appointment.RecurrencePattern property.
| | ChangedOccurrence |
Represents a recurring appointment, which was changed and now doesn’t satisfy the pattern of the recurring series.
| | DeletedOccurrence |
Represents a recurring appointment which was deleted from the series of other recurring appointments of the same pattern.
|
Appointment type cannot be changed directly. The type of the appointment is specified by its role (normal, recurring, changed from recurring series (exception), etc.). All available types are listed in the AppointmentType enumeration.
When you map the Appointment.Type property to the data field, use the field of the int type. The AppointmentType members are enumerated as follows:
The following code snippets (auto-collected from DevExpress Examples) contain references to the Type property.
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.
winforms-scheduler-sync-with-ews/CS/EWSSyncExample/ExchangeExampleForm.cs#L48
foreach(var schedulerAppointment in schedulerDataStorage1.Appointments.Items)
if((schedulerAppointment.Type == DevExpress.XtraScheduler.AppointmentType.Normal) || (schedulerAppointment.Type == DevExpress.XtraScheduler.AppointmentType.Pattern))
// Export Patern and Normal Appointments to Exchange.
winforms-scheduler-get-appointment-by-source-object/CS/Form1.cs#L39
RegisterAppointmentRows(apts);
if (apt.Type == AppointmentType.Pattern) {
RegisterAppointmentRows(apt.GetExceptions());
winforms-scheduler-recurrence-series-occurrencecalculator/CS/OccurrenceCalculatorSample/Form1.cs#L41
// Calculate occurrences for the first recurrent series.
Appointment pattern = schedulerStorage1.Appointments.Items.FirstOrDefault(item => item.Type == AppointmentType.Pattern);
if (pattern == null) return;
winforms-scheduler-sync-outlook-calendars/CS/SyncWithOutlook/OutlookSynchronizerHelper.cs#L116
Appointment currentAppointment = e.Object as Appointment;
if(currentAppointment.CustomFields[OutlookEntryIDFieldName] != null && (currentAppointment.Type == AppointmentType.Normal || currentAppointment.Type == AppointmentType.Pattern)) {
deletedAppointments.Add(currentAppointment.CustomFields[OutlookEntryIDFieldName].ToString());
winforms-scheduler-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Form1.cs#L65
Appointment apt = e.ViewInfo.Appointment;
if (apt.HasReminder && apt.Type == AppointmentType.Occurrence && apt.RecurrencePattern != null) {
Appointment pattern = apt.RecurrencePattern;
winforms-scheduler-sync-with-ews/VB/EWSSyncExample/ExchangeExampleForm.vb#L51
For Each schedulerAppointment In schedulerDataStorage1.Appointments.Items
If (schedulerAppointment.Type = DevExpress.XtraScheduler.AppointmentType.Normal) OrElse (schedulerAppointment.Type = DevExpress.XtraScheduler.AppointmentType.Pattern) Then
' Export Patern and Normal Appointments to Exchange.
winforms-scheduler-get-appointment-by-source-object/VB/Form1.vb#L48
RegisterAppointmentRows(apts)
If apt.Type = AppointmentType.Pattern Then
RegisterAppointmentRows(apt.GetExceptions())
winforms-scheduler-recurrence-series-occurrencecalculator/VB/OccurrenceCalculatorSample/Form1.vb#L39
' Calculate occurrences for the first recurrent series.
Dim pattern As Appointment = schedulerStorage1.Appointments.Items.FirstOrDefault(Function(item) item.Type = AppointmentType.Pattern)
If pattern Is Nothing Then Return
winforms-scheduler-sync-outlook-calendars/VB/SyncWithOutlook/OutlookSynchronizerHelper.vb#L155
Dim currentAppointment As Appointment = TryCast(e.Object, Appointment)
If currentAppointment.CustomFields(OutlookEntryIDFieldName) IsNot Nothing AndAlso (currentAppointment.Type = AppointmentType.Normal OrElse currentAppointment.Type = AppointmentType.Pattern) Then
deletedAppointments.Add(currentAppointment.CustomFields(OutlookEntryIDFieldName).ToString())
winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Form1.vb#L67
Dim apt As Appointment = e.ViewInfo.Appointment
If apt.HasReminder AndAlso apt.Type = AppointmentType.Occurrence AndAlso apt.RecurrencePattern IsNot Nothing Then
Dim pattern As Appointment = apt.RecurrencePattern
See Also