SchedulerControl.DragAppointmentOver Event
Raised repeatedly while the user drags appointments within a Scheduler’s view.
Namespace: DevExpress.Xpf.Scheduling
Assembly: DevExpress.Xpf.Scheduling.v24.2.dll
NuGet Package: DevExpress.Wpf.Scheduling
Declaration
Event Data
The DragAppointmentOver event's data class is DevExpress.Xpf.Scheduling.DragAppointmentOverEventArgs.
Remarks
The example below illustrates how to assign a specific label to appointments that intersect another appointment.
private void Scheduler_DragAppointmentOver(object sender, DragAppointmentOverEventArgs e) {
//if a dragged appointment intersects another appointment, paint it red to indicate a conflict
for (int i = 0; i < e.ConflictedAppointments.Count; i++)
if (e.ConflictedAppointments[i].Count > 0)
e.DragAppointments[i].LabelId = 1;
//roll the label back if no conflicts are detected
for (int j = 0; j < e.ConflictedAppointments.Count; j++)
if (e.ConflictedAppointments[j].Count == 0)
e.DragAppointments[j].LabelId = e.SourceAppointments[j].LabelId;
}
See Also