- 2 minutes to read
A label is an object that is used to categorize appointments. It provides a caption and a color, so that end-users can assign a corresponding color to an appointment's background to identify appointments.
The image below shows appointments with different labels. An end-user can change the appointment's label in the context menu.
A label is an AppointmentLabelItem class instance that is assigned to an appointment using the AppointmentItem.LabelId property. All labels are contained in the SchedulerControl.LabelItems collection and you can use it to customize existing labels, remove them or add your own.
The SchedulerControl.LabelItems collection includes the following labels by default:
|Color||Color Value||Display Name||LabelId|
Label colors are defined in the DevExpress WPF Theme resources using the theme key SchedulerThemeKey and ResourceKey=LabelColors. Different themes can have different label colors. Label colors are available using the SchedulerControl.LabelColors property.
Handle the SchedulerControl.InitNewAppointment event to initialize all newly created appointments with a specific label.