Skip to main content

SchedulerControl.ResourceBrushSchemas Property

OBSOLETE

Use the ResourceColors property instead (BC4919).

Gets or sets the color schemas used to paint resource columns. This is a dependency property.

Namespace: DevExpress.Xpf.Scheduling

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

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

[Browsable(false)]
[Obsolete("Use the SchedulerControl.ResourceColors property instead (BC4919).", false)]
public ResourceBrushSchemaCollection ResourceBrushSchemas { get; set; }

Property Value

Type Description
ResourceBrushSchemaCollection

A ResourceBrushSchemaCollection collection containing the ResourceBrushSchema objects.

Example

The following code demonstrates how to set resource color schemas.

First, define a ResourceBrushSchemaCollection as a window resource in XAML. For each resource you can specify a ResourceBrushSchema.BaseColor, to calculate color variations automatically, or specify its ResourceBrushSchema.DarkCell and ResourceBrushSchema.LightCell cell brush schemas independently. Each CellBrushSchema has its own base, dark and light color settings.

Subsequently, use the SchedulerControl.ResourceBrushSchemas property to assign the resource schema collection to the scheduler (using the StaticResource markup extension).

View Example

<dxsch:ResourceBrushSchemaCollection x:Key="MyResourceSchemas">
    <dxsch:ResourceBrushSchema>
        <dxsch:ResourceBrushSchema.LightCell>
            <dxsch:CellBrushSchema Background="White"
                                   DarkBorderBrush="Gray" 
                                   LightBorderBrush="LightGray" />
        </dxsch:ResourceBrushSchema.LightCell>
        <dxsch:ResourceBrushSchema.DarkCell>
            <dxsch:CellBrushSchema Background="Gray"
                                   DarkBorderBrush="Gray"
                                   LightBorderBrush="Gray"/>
        </dxsch:ResourceBrushSchema.DarkCell>
    </dxsch:ResourceBrushSchema>
    <dxsch:ResourceBrushSchema BaseColor="#FFF3FFE5" />
    <dxsch:ResourceBrushSchema BaseColor="#FFE5FBFF" />
    <dxsch:ResourceBrushSchema BaseColor="#FFFFF1E5" />
</dxsch:ResourceBrushSchemaCollection>
<dxsch:SchedulerControl CustomWorkTime="SchedulerControl_CustomWorkTime"
    GroupType="Resource"
    ResourceBrushSchemas="{StaticResource MyResourceSchemas}">
    <dxsch:SchedulerControl.ResourceItems>
        <dxsch:ResourceItem Caption="One" Id="1" />
        <dxsch:ResourceItem Caption="Two" Id="2" />
        <dxsch:ResourceItem Caption="Three" Id="3" />
        <dxsch:ResourceItem Caption="Four" Id="4" />
    </dxsch:SchedulerControl.ResourceItems>
    <dxsch:WeekView x:Name="weekView1"
        ResourcesPerPage="4"
        ShowAllDayArea="False"
        NavigationButtonsVisibility="Never"
        DateHeaderContentTemplate="{StaticResource DateHeaderControl.ContentTemplate}"/>
    <dxsch:TimelineView x:Name="timelineView1"/>
</dxsch:SchedulerControl>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ResourceBrushSchemas 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