Skip to main content

DataViewBase.ColumnHeaderContentStyle Property

Gets or sets the style of the text within column headers. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v22.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core


public Style ColumnHeaderContentStyle { get; set; }

Property Value

Type Description

A Style object that represents the style of the text within column headers.


The image below shows a grid column whose header caption is red and has a larger font size:


Specify the ColumnBase.ColumnHeaderContentStyle property to change the header content’s appearance. Use the ColumnHeaderContentStyle property to specify the common style applied to all the columns in the current GridControl’s view. The target element for these styles is the ContentControl class.

The following code sample demonstrates how to change the header caption color and increase the font size:

<dxg:GridColumn FieldName="CategoryName">               
      <Style TargetType="{x:Type ContentControl}">
         <Setter Property="FontSize" Value="15" />
         <Setter Property="Foreground" Value="Red" />                        

Use the ColumnBase.ActualColumnHeaderContentStyle property to obtain the current column header content style.

See Also