AppointmentLabel Class
An appointment’s category label.
Namespace: DevExpress.Xpf.Scheduler
Assembly: DevExpress.Xpf.Scheduler.v24.1.dll
NuGet Package: DevExpress.Wpf.Scheduler
Declaration
public class AppointmentLabel :
UserInterfaceObjectWpf,
IAppointmentLabel,
IUserInterfaceObject,
IDisposable
Related API Members
The following members return AppointmentLabel objects:
Remarks
Important
You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.
The AppointmentLabel class represents an individual identification label which can be associated with an appointment. The identification label is one of an appointment’s basic visual characteristics. It is used for at-a-glance appointment identification. The appointment’s identification label is indicated in the Scheduler control as a background color which is used to fill the client region of the rectangle that is occupied by the appointment. The color of each individual identification label object can be set via its AppointmentLabel.Color property.
Identification label objects are contained within the AppointmentLabelCollection collection, which can be accessed via the AppointmentStorage.Labels property.
In order to associate an appointment with a particular identification label specified by its index within the AppointmentStorage.Labels collection, the appointment’s Appointment.LabelKey property can be used.
Example
This example demonstrates how to add items to the collection of appointment labels within the appointment storage using the AppointmentStorage.Labels property.
<dxsch:SchedulerStorage.AppointmentStorage>
<dxsch:AppointmentStorage>
<dxsch:AppointmentStorage.Labels>
<dxsch:AppointmentLabel Color="Aqua" DisplayName="Lunch Time" MenuCaption="Lunch Time"/>
<dxsch:AppointmentLabel Color="Violet" DisplayName="Meeting" MenuCaption="Meeting"/>
<dxsch:AppointmentLabel Color="Yellow" DisplayName="Presentation" MenuCaption="Presentation"/>
</dxsch:AppointmentStorage.Labels>
</dxsch:AppointmentStorage>
</dxsch:SchedulerStorage.AppointmentStorage>