DxSchedulerAppointmentLabelItem Class

An object used as a label to categorize appointments.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public class DxSchedulerAppointmentLabelItem :
    DxSchedulerSourceObjectContainer

Remarks

The DxSchedulerAppointmentLabelItem object is a label or category that you can assign to an appointment to color code, organize and track them.

An appointment displayed in the scheduler view gets its background color from the DxSchedulerAppointmentLabelItem.Color value.

When the end-user creates a new appointment and invokes the full-sized Appointment form, the Label section has a drop-down with the available labels. End-user can select the label to assign to the current appointment:

The scheduler has a built-in collection of labels that consists of 11 color categories. To substitute the built-in collection with your own labels, perform the following steps:

  1. Create a collection of label source objects
  2. Assign the collection to the AppointmentLabelsSource property
  3. Create the DxSchedulerAppointmentLabelMappings instance, specify mappings and assign it to the AppointmentLabelMappings property.

The following code snippet illustrates this approach:

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage()
    {
        AppointmentLabelsSource = new List<LabelObject>()
            {
                new LabelObject() { Id = "1", LabelName = "Label One", LabelColor = System.Drawing.Color.Red },
                new LabelObject() { Id = "2", LabelName = "Label Two", LabelColor = System.Drawing.Color.Green },
            },
        AppointmentLabelMappings = new DxSchedulerAppointmentLabelMappings()
        {
            Id = "Id",
            Caption = "LabelName",
            Color = "LabelColor"
        }
    };
}

Inheritance

Object
DevExpress.Blazor.Scheduler.Internal.NotifyPropertyChangedBase
DxSchedulerSourceObjectContainer
DxSchedulerAppointmentLabelItem
See Also