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

AxisBase.TitleAlignment Property

Specifies the axis title’s alignment.

Namespace: DevExpress.WinUI.Charts

Assembly: DevExpress.WinUI.Charts.v22.1.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP(TitleAlignment.Center, Handler = "InvalidateLayout")]
public TitleAlignment TitleAlignment { get; set; }

Property Value

Type Description
TitleAlignment

A value that defines the title alignment.

Available values:

Name Description
Near

Specifies that the title is aligned near the beginning of the axis.

Center

Specifies that the title is aligned to the center of the axis.

Far

Specifies that the title is aligned far from the beginning of the axis.

Example

The following markup shows the x-axis’ title, and specifies its content and appearance:

Customized axis title

<Charts:CartesianChart.AxisX>
    <Charts:AxisX Title="Year" 
                  ShowTitle="True" 
                  TitleAlignment="Far">
        <Charts:AxisX.TitleContentTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding}" 
                           FontSize="16" 
                           Foreground="Gray"/>
            </DataTemplate>
        </Charts:AxisX.TitleContentTemplate>
    </Charts:AxisX>
</Charts:CartesianChart.AxisX>
See Also