Back to Devexpress

Appointment.LabelKey Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointment-07430ca7.md

latest6.3 KB
Original Source

Appointment.LabelKey Property

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

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.dll

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
object LabelKey { get; set; }
vb
Property LabelKey As Object

Property Value

TypeDescription
Object

An object that specifies the unique identifier of the AppointmentLabel.

|

Remarks

If a SchedulerControl is used in bound mode (that is its data is stored in a database) the LabelKey property’s value is obtained from the data field specified by the AppointmentMappingInfo.Label property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the LabelKey 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-formatting-services/CS/FormattingServicesExample/Data/Data.cs#L35

csharp
apt.StatusKey = 2;
apt.LabelKey = 2;
schedulerStorage1.Appointments.Add(apt);

winforms-scheduler-sync-google-event-colors-with-labels/CS/SchedulerGSync/SchedulerGSync/MainForm.cs#L56

csharp
var eventColorId = e.Event.ColorId ?? this.defaultLabelKey;
    e.IsEqual = eventColorId == (string)e.Appointment.LabelKey;
}

winforms-scheduler-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Form1.cs#L56

csharp
// Modify the appointment for which the alert is triggered.
e.AlertNotifications[0].ActualAppointment.LabelKey = 3;

how-to-implement-a-custom-inplace-editor-for-appointments-e4826/CS/SchedulerInplaceEditorExample/MyInplaceEditor.cs#L92

csharp
this.appointmentLabelEdit1.Storage = storage;
this.appointmentLabelEdit1.AppointmentLabel = storage.Appointments.Labels.GetById(appointment.LabelKey);
this.edtSubject.Text = appointment.Subject;

winforms-scheduler-drag-drop-appointments-from-grid/CS/T179722/Form1.cs#L91

csharp
Duration = apt.Duration,
LabelKey = (int)apt.LabelKey,
StatusKey = (int)apt.StatusKey

winforms-scheduler-formatting-services/VB/FormattingServicesExample/Data/Data.vb#L30

vb
apt.StatusKey = 2
apt.LabelKey = 2
schedulerStorage1.Appointments.Add(apt)

winforms-scheduler-sync-google-event-colors-with-labels/VB/SchedulerGSync/SchedulerGSync/MainForm.vb#L59

vb
Dim eventColorId = If(e.Event.ColorId, Me.defaultLabelKey)
    e.IsEqual = eventColorId = DirectCast(e.Appointment.LabelKey, String)
End Sub

winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Form1.vb#L58

vb
' Modify the appointment for which the alert is triggered.
e.AlertNotifications(0).ActualAppointment.LabelKey = 3

how-to-implement-a-custom-inplace-editor-for-appointments-e4826/VB/SchedulerInplaceEditorExample/MyInplaceEditor.vb#L90

vb
Me.appointmentLabelEdit1.Storage = control.Storage
Me.appointmentLabelEdit1.AppointmentLabel = storage.Appointments.Labels.GetById(appointment.LabelKey)
Me.edtSubject.Text = appointment.Subject

winforms-scheduler-drag-drop-appointments-from-grid/VB/T179722/Form1.vb#L77

vb
Dim apt = aptInfo.EditedAppointment
    exchangeList.Add(New T179722.AppointmentExchangeData() With {.Subject = apt.Subject, .Description = apt.Description, .Start = System.DateTime.MinValue, .Duration = apt.Duration, .LabelKey = CInt(apt.LabelKey), .StatusKey = CInt(apt.StatusKey)})
Next

See Also

Appointment Interface

Appointment Members

DevExpress.XtraScheduler Namespace