Skip to main content

DataControlBase.CellStyle Property

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

Namespace: DevExpress.UI.Xaml.Grid

Assembly: DevExpress.UI.Xaml.Grid.v21.2.dll

NuGet Package: DevExpress.Uwp.Controls

#Declaration

public Style CellStyle { get; set; }

#Property Value

Type Description
Style

A Style object that represents the style applied to data cells.

#Remarks

The CellStyle property specifies the style that groups together properties and resources for CellControls in GridControl. To adjust the appearance of cells in a specific column, use the ColumnBase.CellStyle property. ColumnBase.CellStyle has higher priority than DataControlBase.CellStyle.

Target Type: DevExpress.UI.Xaml.Grid.CellControl.

See the example below.

xmlns:Grid="using:DevExpress.UI.Xaml.Grid"

<Grid:GridControl ... >
    <Grid:GridControl.CellStyle>
        <Style TargetType="Grid:CellControl">
            <Setter Property="FontSize" Value="11"/>
            <Setter Property="Foreground" Value="Blue"/>
        </Style>
    </Grid:GridControl.CellStyle>
    ...
</Grid:GridControl>
See Also