ColorSavingType Enum

Lists values that specify the type of values in the data source field mapped to the Color property.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public enum ColorSavingType

Members

Name Description
Auto

A data field mapped to the Color property can store values of any supported type. The correct value type is determined automatically.

OleColor

A data field mapped to the Color property should store values in OLE format.

ArgbColor

A data field mapped to the Color property should store 32-bit ARGB values (integer values in the "AARRGGBB" format).

ColorString

A data field mapped to the Color property should store string values that specify colors in the hexadecimal format.

ColorInstance

A data field mapped to the Color property should store values of the System.Drawing.Color type.

Related API Members

Remarks

When you implement custom collections of labels or status items, use the DxSchedulerAppointmentLabelMappings.ColorSavingType or DxSchedulerAppointmentStatusMappings.ColorSavingType properties to specify the type of color values stored in a data source field. These values are mapped to the DxSchedulerAppointmentLabelItem.Color or DxSchedulerAppointmentStatusItem.Color property.

When the ColorSavingType property is set to Auto (the default value), the data source field can store colors in any of the supported formats.

To accept values of one type only, set the ColorSavingType property to the corresponding value. If a field value is specified in another format, the color is not applied to the label or status item.

The following example sets the ColorSavingType property to ColorString and defines colors as string hexadecimal values:

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        // Specify appointment mappings here.
        // ...
        AppointmentStatusSource = new List<StatusObject>() {
            new StatusObject() { Id = 1, StatusName = "Resolved", 
                StatusColor = "0xFFFF0000" },
            new StatusObject() { Id = 2, StatusName = "In process", 
                StatusColor = StatusColor = "0xFF0000FF" },
            new StatusObject() { Id = 3, StatusName = "In queue", 
                StatusColor = "0x00FF0000" }
            },
        AppointmentStatusMappings = new DxSchedulerAppointmentStatusMappings() {
            Id = "Id",
            Caption = "StatusName",
            Color = "StatusColor"
            ColorSavingType = DevExpress.Blazor.ColorSavingType.ColorString
        }
    };

    public class StatusObject {
        public int Id { get; set; }
        public string StatusName { get; set; }
        public string StatusColor { get; set; }
    }
}
See Also