Skip to main content

How to: Disable the Appointment Recurrence Feature (legacy)

  • 2 minutes to read

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.

In some real-life applications it may be necessary to prohibit end-users from working with recurring appointments. This example demonstrates how to disable the Appointment Recurrence feature of a scheduler used in bound or unbound mode.

Bound Mode

To disable the Appointment Recurrence feature of the SchedulerControl control used in bound mode, do not specify mappings for the Appointment.RecurrenceInfo and Appointment.Type standard properties of an appointment (the AppointmentMapping.RecurrenceInfo and AppointmentMapping.Type properties).

DXScheduler_DisableRecurrenceFeature

In this case, all pattern appointments and exceptions will be displayed as simple (non-recurring) appointments and recurrence information contained in patterns will be ignored. End-users will be prevented from creating and editing recurrent appointments - the New Recurring Appointment and New Recurring Event items will be removed from the context menu and the Edit Appointment form will not show the Recurrence button allowing end-users to define the recurrence rule.

Unbound Mode

If you use the SchedulerControl control in unbound mode, set the OptionsCustomization.AllowAppointmentCreate and OptionsCustomization.AllowAppointmentEdit properties to the UsedAppointmentType.NonRecurring enumeration member to prevent end-users from creating and editing recurring appointments.

<dxsch:SchedulerControl.OptionsCustomization>
    <dxsch:OptionsCustomization 
                    AllowAppointmentCreate="NonRecurring" 
                    AllowAppointmentEdit="NonRecurring"/>
</dxsch:SchedulerControl.OptionsCustomization>

In this case, the context menu of the scheduler will not contain the New Recurring Appointment and New Recurring Event items, and the Edit Appointment form will not include the Recurrence button that allows end-users to invoke the Appointment Recurrence dialog and specify the recurrence rule.