DxSchedulerAppointmentLabelMappings.BackgroundCssClass Property

Maps an AppointmentLabelsSource's data field to the label's BackgroundCssClass property.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public DxSchedulerMapping BackgroundCssClass { get; set; }

Property Value

Type Description
DxSchedulerMapping

Maps a data field to the appointment property.

Remarks

@code {
    public class LabelObject {
        public int Id { get; set; }
        public string LabelName { get; set; }
        public System.Drawing.Color LabelColor { get; set; }
        public string TextCssClass { get; set; }
        public string BackgroundCssClass { get; set; }
    }

    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        AppointmentLabelsSource = new List<LabelObject>() {
            new LabelObject() { 
                Id = "1", 
                LabelName = "Label One", 
                LabelColor = System.Drawing.Color.Red, 
                TextCssClass = "apt-text-red", 
                BackgroundCssClass = "apt-bg-lightpink",
            },
            new LabelObject() { 
                Id = "2", 
                LabelName = "Label Two", 
                LabelColor = System.Drawing.Color.Green
                TextCssClass = "apt-text-green", 
                BackgroundCssClass = "apt-text-lightgreen"
            },
        },
        AppointmentLabelMappings = new DxSchedulerAppointmentLabelMappings() {
            Id = "Id",
            Caption = "LabelName",
            Color = "LabelColor",
            TextCssClass = "TextCssClass", 
            BackgroundCssClass = "BackgroundCssClass"
        }
    };
}
See Also