Back to Devexpress

AppointmentItem.LabelId Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-appointmentitem-1796e977.md

latest4.7 KB
Original Source

AppointmentItem.LabelId Property

Gets or sets the identifier of the label object associated with the appointment.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public object LabelId { get; set; }
vb
Public Property LabelId As Object

Property Value

TypeDescription
Object

An object that specifies the unique identifier of the AppointmentLabelItem.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the LabelId 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-process-appointment-drag-drop-resize-operations/CS/SchedulerDragDropResizeExample/ViewModel/MainViewModel.cs#L49

csharp
AppointmentItem draggedAppointmentSource = e.SourceAppointments.First();
if (draggedAppointment.LabelId != null)
    if ((int)draggedAppointment.LabelId == 1 && (draggedAppointment.Start != ((MedicalAppointment)draggedAppointmentSource.SourceObject).StartTime))

wpf-scheduler-specify-custom-edit-and-recurrence-dialogs/CS/CustomMvvmFormWithRecurrenceExample/NewAppointmentInitConverter.cs#L7

csharp
protected override object Convert(object sender, AppointmentItemEventArgs args) {
    args.Appointment.LabelId = 1;
    args.Appointment.Reminders.Clear();

wpf-scheduler-create-recurrent-appointments-in-code/CS/RecurrenceExamples/MainWindow.xaml.cs#L29

csharp
apt.Subject = subj;
apt.LabelId = categoryId;
return apt;

wpf-scheduler-process-appointment-drag-drop-resize-operations/VB/SchedulerDragDropResizeExample/ViewModel/MainViewModel.vb#L52

vb
Dim draggedAppointmentSource As AppointmentItem = e.SourceAppointments.First()
If draggedAppointment.LabelId IsNot Nothing Then
    If CInt(draggedAppointment.LabelId) = 1 AndAlso (draggedAppointment.Start <> CType(draggedAppointmentSource.SourceObject, MedicalAppointment).StartTime) Then e.Cancel = True

wpf-scheduler-specify-custom-edit-and-recurrence-dialogs/VB/CustomMvvmFormWithRecurrenceExample/NewAppointmentInitConverter.vb#L10

vb
Protected Overrides Function Convert(ByVal sender As Object, ByVal args As AppointmentItemEventArgs) As Object
    args.Appointment.LabelId = 1
    args.Appointment.Reminders.Clear()

wpf-scheduler-create-recurrent-appointments-in-code/VB/RecurrenceExamples/MainWindow.xaml.vb#L29

vb
apt.Subject = subj
apt.LabelId = categoryId
Return apt

See Also

Labels

AppointmentItem Class

AppointmentItem Members

DevExpress.Xpf.Scheduling Namespace