Back to Devexpress

ResourceMappingInfo.Color Property

corelibraries-devexpress-dot-xtrascheduler-dot-resourcemappinginfo.md

latest6.7 KB
Original Source

ResourceMappingInfo.Color Property

Gets or sets the data field to which the resource color is bound.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.dll

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
[DefaultValue("")]
public virtual string Color { get; set; }
vb
<DefaultValue("")>
Public Overridable Property Color As String

Property Value

TypeDefaultDescription
StringString.Empty

A String value that specifies the name of the bound data field.

|

Remarks

The Color property specifies the name of the data field in the external data source which contains resource color information. The field type is dependent on the ResourceStorageBase.ColorSaving setting.

Note

Resource color in code can be specified using the Resource.ColorValue property, which is platform-independent because it operates with a string representation of the color. WinForms Scheduler provides the ResourceExtension.SetColor and ResourceExtension.GetColor methods which operate with the Color data type. However, the color data type in the external data source is determined by the ResourceStorageBase.ColorSaving setting.

Tip

You can implement a custom ResourceMappingInfo.ColorConverter to store color data using an arbitrary type and format.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Color 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#L61

csharp
mappings.Id = "ResID";
mappings.Color = "ResColor";
mappings.Caption = "Name";

winforms-scheduler-handle-fetchappointments-event/CS/Form1.cs#L29

csharp
mappings.Id = "ResID";
mappings.Color = "ResColor";
mappings.Caption = "Name";

how-to-initialize-appointment-images-and-display-text-using-the-custom-field-values-t328320/CS/CustomAppointmentImageAndText/Form1.cs#L58

csharp
mappings.Caption = "Name";
mappings.Color = "ResColor";

winforms-scheduler-mapping-converters/CS/SchedulerMappingConverterExample/Form1.cs#L62

csharp
schedulerStorage1.Resources.Mappings.Caption = "ResourceName";
schedulerStorage1.Resources.Mappings.Color = "Color";
schedulerStorage1.Resources.Mappings.Id = "ResourceID";

winforms-scheduler-sync-with-outlook/CS/SyncWithOutlook/Form1.cs#L195

csharp
resmappings.Caption = "Name";
resmappings.Color = "ResColor";

winforms-scheduler-gantt-view/VB/dxT183299/Form1.vb#L58

vb
mappings.Id = "ResID"
mappings.Color = "ResColor"
mappings.Caption = "Name"

winforms-scheduler-handle-fetchappointments-event/VB/Form1.vb#L34

vb
mappings.Id = "ResID"
mappings.Color = "ResColor"
mappings.Caption = "Name"

how-to-initialize-appointment-images-and-display-text-using-the-custom-field-values-t328320/VB/CustomAppointmentImageAndText/Form1.vb#L55

vb
mappings.Caption = "Name"
mappings.Color = "ResColor"
CustomResourceCollection.Add(CreateCustomResource(1, "Max Fowler", Color.PowderBlue))

winforms-scheduler-mapping-converters/VB/SchedulerMappingConverterExample/Form1.vb#L64

vb
schedulerStorage1.Resources.Mappings.Caption = "ResourceName"
schedulerStorage1.Resources.Mappings.Color = "Color"
schedulerStorage1.Resources.Mappings.Id = "ResourceID"

winforms-scheduler-sync-with-outlook/VB/SyncWithOutlook/Form1.vb#L185

vb
resmappings.Caption = "Name"
resmappings.Color = "ResColor"

See Also

ResourceMappingInfo Class

ResourceMappingInfo Members

DevExpress.XtraScheduler Namespace