Skip to main content

SchedulerControl.AppointmentDrag Event

Occurs when an appointment is dragged above the Scheduler control.

Namespace: DevExpress.Xpf.Scheduler

Assembly: DevExpress.Xpf.Scheduler.v24.1.dll

NuGet Package: DevExpress.Wpf.Scheduler


public event AppointmentDragEventHandler AppointmentDrag

Event Data

The AppointmentDrag event's data class is AppointmentDragEventArgs. The following properties provide information specific to this event:

Property Description
AdditionalAppointments Provides access to the collection of the additional dragged appointments.
AllowAll Gets or sets whether the user can drag the appointment along time cells.
AllowThisAppointment Gets or sets whether the drag operation is allowed for a specific appointment when the user is dragging multiple appointments at the same time.
CopyEffect Indicates whether the drop effect in a drag-and-drop appointment operation is Copy.
EditedAppointment Gets the appointment being modified in the drag-and-drop event.
ForceUpdateFromStorage Gets or sets whether the View is forced to query appointments from the storage.
HitInterval Gets the time interval represented by the time cell to which an appointment was dragged.
HitResource Gets the resource to which an appointment was dragged.
NewAppointmentResourceIds Gets or sets the IDs of resources for a new appointment.
SourceAppointment Gets the source appointment in the drag-and-drop event.



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.

Use the AppointmentDrag event to manage, with the drag-and-drop action, appointments within the Scheduler control. This event can be denied, canceled or handled specifically, using the information provided by the event argument.


This example demonstrates how to prevent end-users from dragging appointments within a certain time interval (from 12 AM to 12 PM). To implement this restriction, handle the SchedulerControl.AppointmentDrag event and use the AppointmentDragEventArgs.AllowAll and AppointmentDragEventArgs.HitInterval properties to specify the time interval to which appointments can be dragged:

private void schedulerControl1_AppointmentDrag(object sender, AppointmentDragEventArgs e) {
        e.Allow = e.HitInterval.Start.TimeOfDay > TimeSpan.FromHours(12);
See Also