# Recurrences | WPF Controls | DevExpress Documentation

The DevExpress Scheduler control allows you to create recurring appointments.

## How to Create Recurrences

The pattern appointment defines the schedule and time frame of a recurring series.

To create a recurring series in code, set the [AppointmentItem.Type](/WPF/DevExpress.Xpf.Scheduling.AppointmentItem.Type) property to **Pattern** and use the [AppointmentItem.RecurrenceInfo](/WPF/DevExpress.Xpf.Scheduling.SchedulerItemBase.RecurrenceInfo) property to define the recurrence pattern. The scheduler automatically generates occurrences based on the pattern.

The [RecurrenceBuilder](/WPF/DevExpress.Xpf.Scheduling.RecurrenceBuilder) class simplifies the task of creating recurrence patterns. The table below lists the available recurrence builders:

| Recurrence Builder | Example |
| --- | --- |
| [MinutelyRecurrenceBuilder](/WPF/DevExpress.Xpf.Scheduling.MinutelyRecurrenceBuilder) | [How to: Create Minutely Recurrence](/WPF/119642/controls-and-libraries/scheduler/examples/recurrence/how-to-create-minutely-recurrence) |
| [HourlyRecurrenceBuilder](/WPF/DevExpress.Xpf.Scheduling.HourlyRecurrenceBuilder) | [How to: Create Hourly Recurrence](/WPF/119643/controls-and-libraries/scheduler/examples/recurrence/how-to-create-hourly-recurrence) |
| [DailyRecurrenceBuilder](/WPF/DevExpress.Xpf.Scheduling.DailyRecurrenceBuilder) | [How to: Create Daily Recurrence](/WPF/119644/controls-and-libraries/scheduler/examples/recurrence/how-to-create-daily-recurrence) |
| [WeeklyRecurrenceBuilder](/WPF/DevExpress.Xpf.Scheduling.WeeklyRecurrenceBuilder) | [How to: Create Weekly Recurrence](/WPF/119645/controls-and-libraries/scheduler/examples/recurrence/how-to-create-weekly-recurrence) |
| [MonthlyRecurrenceBuilder](/WPF/DevExpress.Xpf.Scheduling.MonthlyRecurrenceBuilder) | [How to: Create Monthly Recurrence](/WPF/119646/controls-and-libraries/scheduler/examples/recurrence/how-to-create-monthly-recurrence) |
| [YearlyRecurrenceBuilder](/WPF/DevExpress.Xpf.Scheduling.YearlyRecurrenceBuilder) | [How to: Create Yearly Recurrence](/WPF/119647/controls-and-libraries/scheduler/examples/recurrence/how-to-create-yearly-recurrence) |

End-users can edit an appointment’s recurrence pattern at runtime using the [Recurrence Window](/WPF/119348/controls-and-libraries/scheduler/visual-elements/windows/recurrence-window).

![RecurrenceWindow](/WPF/images/wpfscheduler_recurrencewindow131151.png)

See also: [How to: Create Regular and Recurrent Appointments at the View Model Level](/WPF/401629/controls-and-libraries/scheduler/examples/How-to-create-regular-and-recurrent-appointments-at-the-view-model-level)

## Occurrences and Exceptions

Use the [AppointmentItem.Type](/WPF/DevExpress.Xpf.Scheduling.AppointmentItem.Type) property to determine an appointment’s type. To determine whether an appointment is recurring, use the [AppointmentItem.IsRecurring](/WPF/DevExpress.Xpf.Scheduling.AppointmentItem.IsRecurring) property.

The **Pattern** appointment defines a recurring series, and **Occurrence** appointments are generated automatically according to the pattern. If you modify an occurrence (for example, postpone it for an hour), its type changes to **ChangedOccurrence**. If you delete an occurrence, it becomes a **DeletedOccurrence**.

![WPF Scheduler_Recurring_Appointments_and_Exceptions](/WPF/images/wpf-scheduler_recurring_appointments_and_exceptions131713.png)

Note

If you modify the pattern, the Scheduler removes all changed and deleted occurrences and repopulates the series with regular occurrences.

### How to Access Occurrences and Exceptions

The **Pattern**, **ChangedOccurrence**, and **DeletedOccurrence** appointments are stored in the [SchedulerControl.AppointmentItems](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.AppointmentItems) collection. The **Occurrence** appointments are not stored in any collection to avoid a stack overflow for infinite recurring series. These appointments are automatically generated at runtime based on the pattern’s [AppointmentItem.RecurrenceInfo](/WPF/DevExpress.Xpf.Scheduling.SchedulerItemBase.RecurrenceInfo). 

Call any of [SchedulerControl.GetPattern](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.GetPattern.overloads) methods to obtain a recurring appointment’s pattern.

Use the scheduler’s [SchedulerControl.GetExceptions](/WPF/DevExpress.Xpf.Scheduling.SchedulerControl.GetExceptions.overloads) method to access the exceptions collection. This collection contains [AppointmentType.ChangedOccurrence](/CoreLibraries/DevExpress.XtraScheduler.AppointmentType) and [AppointmentType.DeletedOccurrence](/CoreLibraries/DevExpress.XtraScheduler.AppointmentType) appointment types. Exceptions replace regular occurrences - the **Occurrence** appointment with the same [SchedulerItemBase.RecurrenceIndex](/WPF/DevExpress.Xpf.Scheduling.SchedulerItemBase.RecurrenceIndex) is not generated for each appointment in the exception’s collection.

Use the [AppointmentItem.RestoreOccurrence](/WPF/DevExpress.Xpf.Scheduling.AppointmentItem.RestoreOccurrence) method to restore the original occurrence from an exception.

See Also

[Delete Occurrence Window](/WPF/119352/controls-and-libraries/scheduler/visual-elements/windows/delete-occurrence-window)

[Open Recurring Item Window](/WPF/119716/controls-and-libraries/scheduler/visual-elements/windows/edit-occurrence-window)