corelibraries-devexpress-dot-xtrascheduler-dot-appointmentconflicteventargs.md
Gets the clone of the appointment being processed in the SchedulerControl.AllowAppointmentConflicts event.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.Desktop.dll
NuGet Package : DevExpress.Scheduler.CoreDesktop
public Appointment AppointmentClone { get; }
Public ReadOnly Property AppointmentClone As Appointment
| Type | Description |
|---|---|
| Appointment |
An Appointment object which is a clone of the AppointmentEventArgs.Appointment.
|
Use the AppointmentClone property to access an appointment after an end-user has dragged-and-dropped it onto another time interval, to check for conflicts after this appointment has been dropped. An appointment returned by the AppointmentClone property is a copy of the appointment currently being processed in this event (AppointmentEventArgs.Appointment) for a different time interval. The time interval for the appointment clone equals the AppointmentConflictEventArgs.Interval value.
The following code snippets (auto-collected from DevExpress Examples) contain references to the AppointmentClone property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-scheduler-enforce-task-dependencies-gantt-view/CS/GanttRestrictions/Form1.cs#L39
if (depCollectionDep.Count > 0) {
if (CheckForInvalidDependenciesAsDependent(depCollectionDep, e.AppointmentClone))
e.Conflicts.Add(e.AppointmentClone);
winforms-scheduler-resolve-appointment-conflicts/CS/DXApplication1/Form1.cs#L86
e.Conflicts.Clear();
FillConflictedAppointmentsCollection(e.Conflicts, e.Interval, ((SchedulerControl)sender).DataStorage.Appointments.Items, e.AppointmentClone);
}
winforms-scheduler-enforce-task-dependencies-gantt-view/VB/GanttRestrictions/Form1.vb#L33
If depCollectionDep.Count > 0 Then
If CheckForInvalidDependenciesAsDependent(depCollectionDep, e.AppointmentClone) Then e.Conflicts.Add(e.AppointmentClone)
End If
winforms-scheduler-resolve-appointment-conflicts/VB/DXApplication1/Form1.vb#L77
e.Conflicts.Clear()
FillConflictedAppointmentsCollection(e.Conflicts, e.Interval, CType(sender, SchedulerControl).DataStorage.Appointments.Items, e.AppointmentClone)
End Sub
See Also
AppointmentConflictEventArgs Class