Back to Devexpress

AppointmentConflictEventArgs.AppointmentClone Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointmentconflicteventargs.md

latest4.5 KB
Original Source

AppointmentConflictEventArgs.AppointmentClone Property

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

Declaration

csharp
public Appointment AppointmentClone { get; }
vb
Public ReadOnly Property AppointmentClone As Appointment

Property Value

TypeDescription
Appointment

An Appointment object which is a clone of the AppointmentEventArgs.Appointment.

|

Remarks

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

csharp
if (depCollectionDep.Count > 0) {
    if (CheckForInvalidDependenciesAsDependent(depCollectionDep, e.AppointmentClone))
        e.Conflicts.Add(e.AppointmentClone);

winforms-scheduler-resolve-appointment-conflicts/CS/DXApplication1/Form1.cs#L86

csharp
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

vb
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

vb
e.Conflicts.Clear()
    FillConflictedAppointmentsCollection(e.Conflicts, e.Interval, CType(sender, SchedulerControl).DataStorage.Appointments.Items, e.AppointmentClone)
End Sub

See Also

AppointmentConflictEventArgs Class

AppointmentConflictEventArgs Members

DevExpress.XtraScheduler Namespace