SchedulerControl.CustomAllowAppointmentCopy Event
Occurs when trying to copy an appointment.
Namespace: DevExpress.Xpf.Scheduling
Assembly: DevExpress.Xpf.Scheduling.v24.2.dll
NuGet Package: DevExpress.Wpf.Scheduling
Declaration
Event Data
The CustomAllowAppointmentCopy event's data class is AppointmentItemOperationEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Allow | Gets or sets whether performing a particular action is allowed. |
Appointment | Gets the appointment for which the element is raised. Inherited from AppointmentItemEventArgs. |
Recurring | Gets whether the target appointment is recurring. |
Remarks
Handle the CustomAllowAppointmentCopy event and sets its AppointmentItemOperationEventArgs.Allow property to manage a particular case and specify whether to allow an end-user to copy an appointment. If you do not specify the required behavior manually, the SchedulerControl.AllowAppointmentCopy manages whether creating new appointments is allowed.
The appointment to be copied can be accessed using the AppointmentItemEventArgs.Appointment property.
Set the AppointmentItemOperationEventArgs.Allow property to false to prevent an appointment from being copied.
Note
The SchedulerControl uses the CommandManager class to manage commands executed by the ribbon or context menu items. The RequerySuggested event is fired when any changes that can affect the command’s ability to execute (e.g., change of focus) have been made. It notifies the command that is should raise the CanExecuteChanged event, which causes the CustomAllowAppointmentCopy event to fire as well. This chain of events can occur involuntarily, so make sure that the event handler does not contain any code that may slow the application performance.