Back to Devexpress

TitleBaseSettings.HorizontalAlignment Property

blazor-devexpress-dot-blazor-dot-base-dot-titlebasesettings-6a4b40f1.md

latest1.9 KB
Original Source

TitleBaseSettings.HorizontalAlignment Property

Specifies horizontal title alignment.

Namespace : DevExpress.Blazor.Base

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(HorizontalAlignment.Center)]
[Parameter]
public HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

TypeDefaultDescription
HorizontalAlignmentCenter

An enumeration value.

|

Available values:

NameDescription
Center

Center alignment.

| | Left |

Left alignment.

| | Right |

Right alignment.

|

Remarks

Specify the HorizontalAlignment property to align the title horizontally.

The following code snippet changes title alignment in the DxBarGauge legend:

razor
<DxBarGauge Width="30%"
            Height="200px"
            StartValue="-5"
            EndValue="5"
            BaseValue="0"
            Values="@Values">
    <DxBarGaugeLegendSettings Visible="true">
        <DxLegendTitleSettings Text="Legend Title"
                               HorizontalAlignment="HorizontalAlignment.Right"
                               VerticalAlignment="VerticalEdge.Bottom">
            <DxLegendSubtitleSettings Text="Legend Subtitle" >
                <DxFontSettings Color="orange" />
            </DxLegendSubtitleSettings>
        </DxLegendTitleSettings>
    </DxBarGaugeLegendSettings>
</DxBarGauge>

@code {
    double[] Values = new double[] { -2.13, 1.48, -3.09, 4.52, 4.9, 3.9 };
}

See Also

TitleBaseSettings Class

TitleBaseSettings Members

DevExpress.Blazor.Base Namespace