DayViewBase.CellStyle Property
Gets or sets the style of time cells in the Day View, Work Week View, and Week View. This is a dependency property.
Namespace: DevExpress.Xpf.Scheduling
Assembly: DevExpress.Xpf.Scheduling.v24.1.dll
NuGet Package: DevExpress.Wpf.Scheduling
Declaration
Property Value
Type | Description |
---|---|
Style | A Style object that represents a style to be applied to time cells. |
Remarks
The CellStyle property specifies the style that groups together properties, resources, and event handlers and shares them between instances of the target type.
Target Type: DevExpress.Xpf.Scheduling.Visual.DayCellControl or the base DevExpress.Xpf.Scheduling.Visual.CellControl.
Example
The code sample below defines and applies a cell style, which hides grid lines and changes the background color to white in the SchedulerControl’s views.
<Window.Resources>
<Style x:Key="CellControl.Style" TargetType="{x:Type dxschv:CellControl}">
<Setter Property="BottomBorderThickness" Value="0" />
<Setter Property="LeftBorderThickness" Value="0" />
<Setter Property="Background" Value="White" />
<Setter Property="SelectedBackground" Value="White" />
</Style>
<Style TargetType="{x:Type dxsch:DayView}">
<Setter Property="CellStyle" Value="{StaticResource CellControl.Style}" />
</Style>
<Style TargetType="{x:Type dxsch:WorkWeekView}">
<Setter Property="CellStyle" Value="{StaticResource CellControl.Style}" />
</Style>
<Style TargetType="{x:Type dxsch:WeekView}">
<Setter Property="CellStyle" Value="{StaticResource CellControl.Style}" />
</Style>
<Style TargetType="{x:Type dxsch:MonthView}">
<Setter Property="CellStyle" Value="{StaticResource CellControl.Style}" />
</Style>
<Style TargetType="{x:Type dxsch:TimelineView}">
<Setter Property="CellStyle" Value="{StaticResource CellControl.Style}" />
</Style>
</Window.Resources>
Refer to the following example for more information on available cell customization techniques:
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CellStyle 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.