Skip to main content
A newer version of this page is available. .

ResourceDataStorage.ColorSaving Property

Gets or sets a type of format to store the color information.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v18.2.dll

Declaration

[DefaultValue(DXColorSavingType.Auto)]
[DXCategory("Behavior")]
public DXColorSavingType ColorSaving { get; set; }

Property Value

Type Default Description
DXColorSavingType **Auto**

A ColorSavingType enumeration value, indicating the type in which the color is stored.

Available values:

Name Description
Auto

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

OleColor

A data field mapped to the LabelMappingInfo.Color property must store OLE_Color values.

ArgbColor

A data field mapped to the LabelMappingInfo.Color property must store 32-bit ARGB values (integer values in the “AARRGGBB” format, e.g. “-65536” for red). You can retrieve integer ARGB values using the Color.ToArgb method.

ColorString

A data field mapped to the LabelMappingInfo.Color property must store string values that specify colors in the hexadecimal format (e.g., “0xFFFF0000” for red).

ColorInstance

A data field mapped to the LabelMappingInfo.Color property must store System.Drawing.Color type values.

Remarks

If the color has ARGB format, that is: 8 bit for Alpha-Transparency, 8 bit Red, 8 bit Green, 8 bit Blue, then you should set the ColorSaving value to ColorSavingType.ArgbColor. The FromArgb method is used to create a Color structure from a 32-bit ARGB value.

The color can be specified in OLE_COLOR format, that is one most significant reserved byte, then, depending on the value of this byte, either byte for Blue, byte for Green, byte for Red (if reserved byte is zero) or the system color index, or an offset into a custom pallette. The ColorSavingType.OleColor value means that for the translation of a supplied OLE color value to a GDI+ System.Drawing.Color structure the FromOle method is used.

Note that the ColorSavingType.Color value stores a color as the .NET Color object, which is not a regular data field type and may require a converter.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ColorSaving property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also