Skip to main content

BaseColumn.HorizontalHeaderContentAlignment Property

Gets or sets the column header’s content alignment. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core


public HorizontalAlignment HorizontalHeaderContentAlignment { get; set; }

Property Value

Type Description

A HorizontalAlignment enumeration value that specifies the content’s horizontal alignment.


Use the HorizontalHeaderContentAlignment property to align the header content:


<dxg:GridColumn FieldName="Category" HorizontalHeaderContentAlignment="Center"/>

To align content in the column cells, follow the steps below:

  1. Create an *EditSettings object and assign it to the ColumnBase.EditSettings property.
  2. Use the BaseEditSettings.HorizontalContentAlignment property to specify the cell content alignment.

<dxg:GridColumn FieldName="Category" HorizontalHeaderContentAlignment="Center">
         <dxe:TextEditSettings HorizontalContentAlignment="Center"/>

Refer to the following help topic for more information: Column Header Customization.

See Also