Back to Devexpress

AppointmentItemConflictEventArgs.AppointmentClone Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-appointmentitemconflicteventargs.md

latest3.3 KB
Original Source

AppointmentItemConflictEventArgs.AppointmentClone Property

Gets the clone of the appointment being processed.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

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

Property Value

TypeDescription
AppointmentItem

An AppointmentItem object that is a clone of the AppointmentItemEventArgs.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 (AppointmentItemEventArgs.Appointment) for a different time interval. The time interval for the appointment clone equals the AppointmentItemConflictEventArgs.Interval value.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.

wpf-scheduler-apply-end-user-restrictions/CS/WpfApplication1/MainWindow.xaml.cs#L37

csharp
if (!IsIntervalAllowed(interval))
        e.Conflicts.Add(e.AppointmentClone);
}

wpf-scheduler-apply-end-user-restrictions/VB/WpfApplication1/MainWindow.xaml.vb#L40

vb
Dim interval As TimeInterval = e.Interval
    If Not IsIntervalAllowed(interval) Then e.Conflicts.Add(e.AppointmentClone)
End Sub

See Also

AppointmentItemConflictEventArgs Class

AppointmentItemConflictEventArgs Members

DevExpress.Xpf.Scheduling Namespace