Skip to main content
A newer version of this page is available. .

SchedulerControl.AppointmentDragOver Event

Raised repeatedly while the user drags appointments in the Scheduler control.

Namespace: DevExpress.WinUI.Scheduler

Assembly: DevExpress.WinUI.Scheduler.v22.1.dll

NuGet Package: DevExpress.WinUI

Declaration

public event EventHandler<AppointmentDragOverEventArgs> AppointmentDragOver

Event Data

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

Property Description
AcceptedOperation Specifies the operations the user is allowed to perform. Inherited from AppointmentDragEventArgsBase.
Cancel Specifies whether to cancel the drag-drop operation. Inherited from AppointmentDragEventArgsBase.
DraggingAppointments Returns the collection of appointments the user is dragging. Inherited from AppointmentDragDropEventArgsBase.
DragUIOverride Returns the visual representation of appointments the user is dragging. Inherited from AppointmentDragEventArgsBase.
Handled Inherited from SchedulerDragEventArgsBase.
SourceAppointments Returns the collection of appointments before the changes the user attempts to apply. Inherited from AppointmentDragDropEventArgsBase.

Remarks

Use the AcceptedOperation event parameter to limit the actions available to the user. See the example below.

private void Scheduler_AppointmentDragOver(object sender, AppointmentDragOverEventArgs e) {
    foreach (AppointmentItem item in e.DraggingAppointments)
        if ((item.Start.Hour < 7) || (item.Start.Hour > 20) || (item.End.Hour > 20))
            e.AcceptedOperation = Windows.ApplicationModel.DataTransfer.DataPackageOperation.None;
}
See Also