Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SchedulerControl.AppointmentDrag Event

OBSOLETE

Use the DragAppointmentOver event instead (BC4918).

Occurs when an appointment is dragged above the SchedulerControl.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.2.dll

NuGet Package: DevExpress.Wpf.Scheduling

#Declaration

[Browsable(false)]
[Obsolete("Use the SchedulerControl.DragAppointmentOver event instead (BC4918).", false)]
public event AppointmentItemDragDropEventHandler AppointmentDrag

#Event Data

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

Property Description
Allow Specifies whether the appointment can be dragged or dropped along the time cells.
CopyEffect Indicates whether the appointment is copied when drag-and-dropping it to another location.
HitInterval Gets the datetime range represented by the time cell to which an appointment is dragged.
HitResource Indicates the resource to which an appointment is dragged.
IsExternalDragDrop Indicates whether the appointment is dragged-and-dropped from the external component.
ViewModels Provides access to the list of View Models for dragged appointments.

#Remarks

You can cancel the drag-and-drop operation by setting the AppointmentItemDragDropEventArgs.Allow property to false in the event handler.

The original appointment (before dragging) is accessible using the AppointmentEditViewModelBase.Appointment property of the AppointmentDragResizeViewModel object contained in the AppointmentItemDragDropEventArgs.ViewModels collection.

See Also