AppointmentLabelItem Class
An appointment label.
Namespace: DevExpress.Maui.Scheduler
Assembly: DevExpress.Maui.Scheduler.dll
NuGet Package: DevExpress.Maui.Scheduler
Declaration
public class AppointmentLabelItem :
SourceObjectContainer
Related API Members
The following members return AppointmentLabelItem objects:
Remarks
Labels specify colors that the scheduler uses to paint its appointments.
A scheduler view holds its labels in the LabelItems collection of the SchedulerDataStorage object assigned to the view’s DataStorage property. You can customize existing labels, remove them or add new ones. An individual label is an AppointmentLabelItem object. It provides the Caption and Color properties that you can use to specify a label’s display name and color.
To bind a scheduler view to an external data source of labels, set the SchedulerDataStorage.DataSource property to a DataSource object and bind the DataSource.AppointmentLabelsSource property to a collection of label objects. The DataSource.AppointmentLabelMappings property specifies how to convert source objects to appointment labels. See the example How to: Create Custom Labels.
Note
The LabelItems collection is always synchronous with the scheduler storage’s DataSource when the source is specified.
You can use the DataSource.CreateSourceObject event to create a source object that is assigned to a new item if the source objects’ type does not provide a parameterless constructor.
The appointment’s LabelId should be equal to a label’s Id to make the scheduler use the label’s color to paint the appointment.
The scheduler fills its label collection with the following default labels if you do not populate the collection manually or generate labels from a data source.
Color | Color Value | Display Name | Label Id (Int32 Value) |
---|---|---|---|
#949494 | None | 0 | |
#F15558 | Important | 1 | |
#FF7C11 | Business | 2 | |
#FFBF22 | Personal | 3 | |
#FF6E86 | Vacation | 4 | |
#9865b0 | Must Attend | 5 | |
#756CFD | Travel Required | 6 | |
#0055D8 | Needs Preparation | 7 | |
#01B0EE | Birthday | 8 | |
#0097AD | Anniversary | 9 | |
#00C831 | Phone Call | 10 |