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

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.v19.1.Core.dll

Declaration

public Style ColumnHeaderContentStyle { get; set; }

Property Value

Type Description
Style

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

Remarks

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

ColumnHeaderCustomizationContentStyle

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">               
   <dxg:GridColumn.ColumnHeaderContentStyle>
      <Style TargetType="{x:Type ContentControl}">
         <Setter Property="FontSize" Value="15" />
         <Setter Property="Foreground" Value="Red" />                        
      </Style>
   </dxg:GridColumn.ColumnHeaderContentStyle>                
</dxg:GridColumn>

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

See Also