Skip to main content

ColumnBase.HeaderStyle Property

Gets or sets the style applied to the column header. This is a dependency property.

Namespace: DevExpress.WinUI.Grid

Assembly: DevExpress.WinUI.Grid.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP(null)]
public Style HeaderStyle { get; set; }

Property Value

Type Description
Style

A Style object that contains style settings.

Remarks

Target type: DevExpress.WinUI.Grid.BaseColumnHeaderControl

Example

The following code sample changes the Product Name column’s header background to LightSkyBlue:

WinUI Grid: Header Style

<Window ...
    xmlns:dxg="using:DevExpress.WinUI.Grid"
    xmlns:dxgi="using:DevExpress.WinUI.Grid.Internal">
    <dxg:GridControl ...>
        <dxg:GridControl.Columns>
            <dxg:GridTextColumn FieldName="ProductName">
                <dxg:GridTextColumn.HeaderStyle>
                    <Style TargetType="dxgi:BaseColumnHeaderControl">
                        <Setter Property="Background" Value="LightSkyBlue"/>
                    </Style>
                </dxg:GridTextColumn.HeaderStyle>
            </dxg:GridTextColumn>
            <!-- Columns -->
        </dxg:GridControl.Columns>
    </dxg:GridControl>
</Window>
See Also