How to: Set End-User Restrictions (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 might be necessary to prevent end-users from creating or editing (copy, deleting, dragging, etc.) appointments shown within the SchedulerControl. For instance, it may be necessary to show all the appointments to end-users as read-only.
To implement end-user restrictions in your application, you can use the SchedulerControl.OptionsCustomization property providing access to the customization settings. The following restrictions are possible in the SchedulerControl:
Restriction | Description |
---|---|
OptionsCustomization.AllowAppointmentConflicts | Gets or sets a value that specifies whether an end-user is allowed to share the schedule time between two or more appointments. |
OptionsCustomization.AllowAppointmentCopy | Gets or sets a value that specifies whether an end-user is allowed to copy appointments. |
OptionsCustomization.AllowAppointmentCreate | Gets or sets a value that specifies whether an end-user is allowed to create new appointments. |
OptionsCustomization.AllowAppointmentDelete | Gets or sets a value that specifies whether an end-user is allowed to delete appointments. |
OptionsCustomization.AllowAppointmentDrag | Gets or sets a value that specifies whether an end-user is allowed to drag and drop appointments to another time slot or date. |
OptionsCustomization.AllowAppointmentDragBetweenResources | Gets or sets a value that specifies whether an end-user is allowed to drag and drop appointments between resources. |
OptionsCustomization.AllowAppointmentEdit | Gets or sets a value that specifies whether an end-user is allowed to edit appointments. |
OptionsCustomization.AllowAppointmentMultiSelect | Gets or sets a value that specifies whether an end-user is allowed to select more than one appointment simultaneously. |
OptionsCustomization.AllowAppointmentResize | Gets or set a value that specifies whether an end-user is allowed to change the time boundaries of appointments. |
OptionsCustomization.AllowDisplayAppointmentForm | Gets or sets the option specifying whether the Edit Appointment dialog can be invoked. |
OptionsCustomization.AllowInplaceEditor | Gets or sets a value that specifies whether an inplace editor can be activated for an appointment. |
You can set a corresponding value as required, e.g. set UsedAppointmentType.None to prohibit a particular action for all appointment types, or set it to UsedAppointmentType.Recurring to allow it for recurring appointments only.
If you set one of the OptionsCustomization.Allow* properties to UsedAppointmentType.Custom, a related Allow* event will fire, in which you can decide how to handle a particular case.