Back to Devexpress

AppointmentLabelMappings.Color Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-appointmentlabelmappings-01d1c43e.md

latest4.9 KB
Original Source

AppointmentLabelMappings.Color Property

Gets or sets the mapping that binds the appointment label’s AppointmentLabelItem.Color property to the data source field.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public Mapping Color { get; set; }
vb
Public Property Color As Mapping

Property Value

TypeDescription
Mapping

A Mapping object indicating the data field and converter.

|

Remarks

Tip

The Brush property is the recommended method to assign colors to labels. The Brush property overrides the Color property. Refer to the Customize Colors topic for more information.

Use the Color property to bind the appointment label’s AppointmentLabelItem.Color property to a data field. The data field is obtained from the data source specified by the DataSource.AppointmentLabelsSource property.

The AppointmentLabelMappings.ColorSavingType property allows you define the format in which to store the color information.

Use the Mapping.Converter property to register a value converter for a custom storing 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.

wpf-scheduler-implement-custom-mapping-converter-for-color-values/CS/ColorMappingExample/MainWindow.xaml#L53

xml
<dxsch:DataSource.AppointmentLabelMappings>
    <dxsch:AppointmentLabelMappings Color="{dxsch:Mapping FieldName=ColorData,
        ConversionBehavior=BetweenFieldAndMapping,

wpf-scheduler-add-datenavigator-and-resourcetree-controls/CS/DXSample/MainWindow.xaml#L46

xml
<dxsch:DataSource.AppointmentLabelMappings>
    <dxsch:AppointmentLabelMappings Color="Color"
                                    Caption="Caption"

wpf-scheduler-process-appointment-drag-drop-resize-operations/CS/SchedulerDragDropResizeExample/MainWindow.xaml#L77

xml
<dxsch:AppointmentLabelMappings
    Color="Color"
    Caption="Caption"

wpf-scheduler-hide-non-working-days-in-day-view/CS/NavigateCommandExample/MainWindow.xaml#L64

xml
<dxsch:AppointmentLabelMappings
    Color="Color"
    Caption="Caption"

wpf-scheduler-customize-context-menus/CS/DXScheduler_PopUpMenuCustomization/MainWindow.xaml#L44

xml
Caption="Caption"
                                    Color="Color"/>
</dxsch:DataSource.AppointmentLabelMappings>

See Also

AppointmentLabelMappings Class

AppointmentLabelMappings Members

DevExpress.Xpf.Scheduling Namespace