corelibraries-devexpress-dot-xtrascheduler-dot-resourcestoragebase-3b5b7f78.md
Gets or sets a type of format to store the color information.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.Desktop.dll
NuGet Package : DevExpress.Scheduler.CoreDesktop
[DefaultValue(ColorSavingType.OleColor)]
public ColorSavingType ColorSaving { get; set; }
<DefaultValue(ColorSavingType.OleColor)>
Public Property ColorSaving As ColorSavingType
| Type | Default | Description |
|---|---|---|
| ColorSavingType | OleColor |
A ColorSavingType enumeration value, indicating the type in which the color is stored.
|
Available values:
| Name | Description |
|---|---|
| OleColor |
Stores the color setting in OLE_COLOR format.
| | ArgbColor |
Stores the color setting in ARGB format.
| | Color |
Stores the color setting as a system defined color Color.
|
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 snippets (auto-collected from DevExpress Examples) contain references 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.
winforms-scheduler-gantt-view/CS/dxT183299/Form1.cs#L28
schedulerControl.Start = System.DateTime.Now;
schedulerStorage.Resources.ColorSaving = ColorSavingType.Color;
schedulerStorage.AppointmentInserting += schedulerStorage_AppointmentInserting;
winforms-scheduler-handle-fetchappointments-event/CS/Form1.cs#L15
InitializeComponent();
schedulerStorage1.Resources.ColorSaving = ColorSavingType.Color;
}
winforms-scheduler-sort-resources/CS/Form1.cs#L67
schedulerStorage1.Resources.ColorSaving = ColorSavingType.ArgbColor;
schedulerStorage1.Resources.DataSource = dataModel;
winforms-scheduler-gantt-view/VB/dxT183299/Form1.vb#L27
schedulerControl.Start = Date.Now
schedulerStorage.Resources.ColorSaving = ColorSavingType.Color
AddHandler schedulerStorage.AppointmentInserting, AddressOf schedulerStorage_AppointmentInserting
winforms-scheduler-handle-fetchappointments-event/VB/Form1.vb#L20
InitializeComponent()
schedulerStorage1.Resources.ColorSaving = ColorSavingType.Color
End Sub
winforms-scheduler-sort-resources/VB/Form1.vb#L68
schedulerStorage1.Resources.ColorSaving = ColorSavingType.ArgbColor
schedulerStorage1.Resources.DataSource = dataModel
winforms-scheduler-data-binding-entity-framework-code-first/VB/XtraSchedulerEFTest/Form1.vb#L15
schedulerStorage1.Appointments.ResourceSharing = True
schedulerControl1.Storage.Resources.ColorSaving = ColorSavingType.ArgbColor
See Also