DataViewBase.CellStyle Property

Gets or sets the style applied to data cells displayed within a View. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.1.Core.dll

Declaration

public Style CellStyle { get; set; }
Public Property CellStyle As Style

Property Value

Type Description
Style

The style applied to data cells.

Remarks

The CellStyle property specifies the style that groups together properties, resources, and event handlers and shares them between instances of the LightweightCellEditor type.

Target Type:

<dxg:TableView>
    <dxg:TableView.CellStyle>
        <Style TargetType="dxg:LightweightCellEditor" />
    </dxg:TableView.CellStyle>
</dxg:TableView>

The GridControl's CellStyle property is theme dependent. Create a new style based on the existing cell style to apply a CellStyle. For example, if you use the MetropolisDark theme, your style's BasedOn property should be set to the following value:

<dxg:GridColumn.CellStyle>
    <Style TargetType="dxg:LightweightCellEditor" BasedOn="{StaticResource {dxgt:GridRowThemeKey ResourceKey=LightweightCellStyle, ThemeName=MetropolisDark}}"/>
</dxg:GridColumn.CellStyle>
See Also