AxisBase.TitleAlignment Property
In This Article
Specifies the axis title’s alignment.
Namespace: DevExpress.WinUI.Charts
Assembly: DevExpress.WinUI.Charts.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
[DP(TitleAlignment.Center, Handler = "InvalidateLayout")]
public TitleAlignment TitleAlignment { get; set; }
#Property Value
Type | Description |
---|---|
Title |
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:
<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