Back to Devexpress

Appointment.RecurrenceIndex Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointment-256d258a.md

latest4.3 KB
Original Source

Appointment.RecurrenceIndex Property

Gets the index in the recurrence series.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
int RecurrenceIndex { get; }
vb
ReadOnly Property RecurrenceIndex As Integer

Property Value

TypeDescription
Int32

An integer value that is the appointment’s zero-based index within the recurrence series.

|

Remarks

The RecurrenceIndex property identifies the number (zero-based) of the appointment occurrence within the recurrence series specified by the appointment’s Appointment.RecurrenceInfo settings.

For appointments of the AppointmentType.Normal and AppointmentType.Pattern types the RecurrenceIndex property returns 0.

The following code snippets (auto-collected from DevExpress Examples) contain references to the RecurrenceIndex 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-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Form1.cs#L68

csharp
RecurringReminder reminder = (RecurringReminder)pattern.Reminder;
    e.ViewInfo.ShowBell = reminder.AlertOccurrenceIndex <= apt.RecurrenceIndex;
}

winforms-scheduler-sync-with-ews/CS/EWSSyncExample/Synchronizer.cs#L265

csharp
if(exception.Type == DevExpress.XtraScheduler.AppointmentType.DeletedOccurrence) {
    ExchangeAppointment appointment = ExchangeAppointment.BindToOccurrence(service, exchangeAppointment.Id, exception.RecurrenceIndex + 1, new PropertySet());
    appointment.Delete(DeleteMode.MoveToDeletedItems);

winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Form1.vb#L70

vb
Dim reminder As RecurringReminder = CType(pattern.Reminder, RecurringReminder)
    e.ViewInfo.ShowBell = reminder.AlertOccurrenceIndex <= apt.RecurrenceIndex
End If

winforms-scheduler-sync-with-ews/VB/EWSSyncExample/Synchronizer.vb#L253

vb
If exception.Type = DevExpress.XtraScheduler.AppointmentType.DeletedOccurrence Then
    Dim appointment As ExchangeAppointment = ExchangeAppointment.BindToOccurrence(service, exchangeAppointment.Id, exception.RecurrenceIndex + 1, New PropertySet())
    appointment.Delete(DeleteMode.MoveToDeletedItems)

See Also

RecurrenceInfo

RecurrencePattern

Appointment Interface

Appointment Members

DevExpress.XtraScheduler Namespace