Skip to main content

SchedulerControl.LabelColors Property

Gets or sets label colors.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.1.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

[Browsable(false)]
public ColorCollection LabelColors { get; set; }

Property Value

Type Description
DevExpress.Xpf.Scheduling.ColorCollection

A LabelColorCollection collection containing colors.

Remarks

The AppointmentLabelItem.Color property defines the appointment color and has the highest priority. If you set this property (either directly or by mapping), the LabelColors setting is ignored.

If you do not use the AppointmentLabelItem.Color property, the Scheduler control takes a label color from the LabelColors palette.

You can set LabelColors directly for all themes:

 <dxsch:SchedulerControl.LabelColors>
    <Color>Transparent</Color>
    <Color>Red</Color>
</dxsch:SchedulerControl.LabelColors>

An alternative approach is to override the label colors palette for a certain theme. To do this, use the DevExpress.Xpf.Scheduling.Themes.SchedulerThemeKeys.LabelColors and DevExpress.Xpf.Scheduling.Themes.SchedulerThemeKeys.LabelColors_Classic resource keys. The SchedulerThemeKeys.LabelColors_Classic resource key is only used in the Classic scheduler appearance style:

<dxsch:ColorCollection x:Key="{dxscht:SchedulerThemeKey ResourceKey=LabelColors, ThemeName=Office2019Colorful}">
    <Color>Transparent</Color>
    <Color>Red</Color>
</dxsch:ColorCollection>

If the AppointmentLabelItem.Color property is set to Colors.Transparent, the appointment color is taken from the assigned resource item. If appointment has several assigned resources and SchedulerControl.GroupType is None, the appointment has the default theme background.

Tip

Use the SchedulerControl.LabelItems property to get access to the scheduler’s label collection.

See Also