Skip to main content
A newer version of this page is available. .

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.v18.2.dll

Declaration

public Style CellStyle { get; set; }

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 example below demonstrates how to define and apply 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>

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.

See Also