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.v26.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).
<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>