MonthView.CellStyle Property
Gets or sets the style of time cells in the Month View. This is a dependency property.
Namespace: DevExpress.Xpf.Scheduling
Assembly: DevExpress.Xpf.Scheduling.v24.2.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.MonthCellControl 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: