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.v23.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public enum ColorSavingType
Members
Name | Description |
---|---|
Auto
|
A data field mapped to the |
OleColor
|
A data field mapped to the |
ArgbColor
|
A data field mapped to the |
ColorString
|
A data field mapped to the |
ColorInstance
|
A data field mapped to the |
Related API Members
The following properties accept/return ColorSavingType values:
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; }
}
}