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.v24.2.Core.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Property Value
Type | Description |
---|---|
HorizontalAlignment | A HorizontalAlignment enumeration value that specifies the content’s horizontal alignment. |
Remarks
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:
- Create an *EditSettings object and assign it to the ColumnBase.EditSettings property.
- Use the BaseEditSettings.HorizontalContentAlignment property to specify the cell content alignment.
<dxg:GridColumn FieldName="Category" HorizontalHeaderContentAlignment="Center">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
Refer to the following help topic for more information: Column Header Customization.
See Also