SchedulerControl.DropAppointment Event
Occurs when the user drops appointments within a Scheduler’s view.
Namespace: DevExpress.Xpf.Scheduling
Assembly: DevExpress.Xpf.Scheduling.v19.1.dll
Declaration
Event Data
The DropAppointment event's data class is DevExpress.Xpf.Scheduling.DropAppointmentEventArgs.
Remarks
Set the event’s Cancel property to true to disable the default Scheduler’s drop behavior.
The example below illustrates how to override the AllowAppointmentConflicts property that is set to false.
private void Scheduler_DropAppointment(object sender, DropAppointmentEventArgs e) {
for (int i = 0; i < e.DragAppointments.Count; i++) {
//if a dragged appointment does not intersect another appointment
if (e.ConflictedAppointments[i].Count == 0) {
//it can be moved to the desired position
e.SourceAppointments[i].Start = e.DragAppointments[i].Start;
e.SourceAppointments[i].End = e.DragAppointments[i].End;
}
}
See Also