[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Collapse]Scheduler (legacy)
   [Expand]Overview
   [Expand]Getting Started
   [Collapse]Fundamentals
    [Expand]Scheduler Elements
    [Collapse]Appointments
      What Is an Appointment
      Appointment Labels and Statuses
      Recurring Appointments and Exceptions
      Reminders for Appointments
     Resources
    [Expand]Views
     Pop-up Menus
    [Expand]Data Binding
    [Expand]Mappings
    [Expand]Supported Formats
    [Expand]Styles and Templates
     Services
     Time Zones
    [Expand]Printing
     Product Class Structure
     Scheduling Basics
   [Expand]Visual Elements
   [Expand]Examples
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Recurring Appointments and Exceptions

Note

You are viewing documentation for the legacy WPF Scheduler control. If you're starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

This document introduces the main concepts behind the creation and use of recurring appointments in your scheduling application. The SchedulerControl can process end-user appointments based on a daily, weekly, monthly, or yearly recurrence pattern, either with an end condition or without any end date. You're also able to create exceptions to these recurring series, and this makes using recurring appointments more useful in real scheduling applications.

Expanded Non-Recurring and Recurring Appointments

All appointments within the SchedulerControl can be either simple (non-recurring), occurring only once in the specified time interval, or recurring many times in the same interval. Whether an appointment is recurring or not is identified by the Appointment.IsRecurring value.

Recurring appointments can be of different types. Note that the type of any particular appointment is accessed via its Appointment.Type property. The following image demonstrates the possible types of recurring appointments.

So, a recurring appointment can either be a base (a Pattern), or an occurrence. Occurring appointments can either be a simple Occurrence, or an exception (a ChangedOccurrence or a DeletedOccurrence). The following sections describe the differences between these recurring appointments.

Expanded Base Recurring Appointment and Recurrence Pattern

Every series of a recurring appointment is specified by its base appointment (Pattern), which is returned by the Appointment.RecurrencePattern property of all other appointments in the series. The Pattern appointment contains information about a recurrence. Actually, it sets the start date and time of the recurrence series and specifies a rule, according to which a series is repeated. This recurrence rule is accessed via the pattern's Appointment.RecurrenceInfo property.

The Pattern appointment is stored in the AppointmentStorage collection. All other Occurrence appointments (except for ChangedOccurrence and DeletedOccurrence) are not stored in any collection. They are automatically generated at runtime according to the RecurrenceInfo of the pattern appointment.

Note

A series of recurring appointments can be either finite or infinite. Occurrence appointments are not stored in any collection, to avoid stack overflow for infinitive recurring series.

End-users can edit the recurrence pattern of any appointment at runtime via the Appointment Recurrence form. The image below demonstrates the common appearance of this dialog.

There are different types of recurrence patterns which can be used to specify the rule for recurring series. The following table describes what properties of the RecurrenceInfo are used for different recurrence patterns.

The RecurrenceInfo.Type property value Used properties
RecurrenceType.Daily RecurrenceInfo.Periodicity, RecurrenceInfo.WeekDays
RecurrenceType.Weekly RecurrenceInfo.Periodicity, RecurrenceInfo.WeekDays
RecurrenceType.Monthly RecurrenceInfo.DayNumber, RecurrenceInfo.Periodicity, RecurrenceInfo.WeekDays, RecurrenceInfo.WeekOfMonth
RecurrenceType.Yearly RecurrenceInfo.DayNumber, RecurrenceInfo.Month, RecurrenceInfo.WeekDays, RecurrenceInfo.WeekOfMonth

You can use the OccurrenceCalculator instance to calculate occurrences. The OccurrenceCalculator.CalcOccurrences method creates a sequence of appointments for the specified pattern within the specified time interval.

Expanded Recurrence Pattern Exceptions

As stated above, from all the recurring series only the Pattern appointment is stored in the SchedulerStorage.AppointmentStorage collection. Others (Occurrence) are usually generated at runtime, to avoid excessive use of system memory.

However, every Pattern appointment contains a collection of exceptions. Exceptions are the Occurrence appointments which have either been changed or deleted, and so no longer meet the common recurrence rule specified by the pattern appointment.

Note

All occurrences within a recurring series are associated with the same resource. A changed occurrence can differ from its pattern by a subject, description, label, status, start time, end time, but not by a resource.

A collection of exceptions for a particular recurrence pattern is returned via the pattern's Appointment.GetExceptions method. This collection contains both appointments of the AppointmentType.ChangedOccurrence and AppointmentType.DeletedOccurrence types. Note that if an appointment is contained in this collection, then in this case, the corresponding Occurrence appointment will not be generated.

Note

To stop an appointment from being an exception, you should call the Appointment.RestoreOccurrence method for it.

Expanded See Also

Is this topic helpful?​​​​​​​