Skip to main content

FormLayoutItemBase.CaptionPosition Property

Specifies the caption position of a group, tab, or item.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(CaptionPosition.Vertical)]
[Parameter]
public CaptionPosition CaptionPosition { get; set; }

Property Value

Type Default Description
CaptionPosition Vertical

A CaptionPosition enumeration value.

Available values:

Name Description
Vertical

Displays the caption above the associated editor.

Horizontal

Displays the caption to the left of the item.

Remarks

You can display the caption above an item (Vertical) or at its left (Horizontal). Use the item’s CaptionPosition property to position a single item. To specify the position for all captions in the Form Layout component, layout group, tab pages, tab page, or item, use the corresponding object’s CaptionPosition property. Individual settings have higher priority.

In the following example, the CaptionPosition property of the second TabPage is set to Vertical.

<DxFormLayout>
    <DxFormLayoutTabPages>
        <DxFormLayoutTabPage CaptionPosition="CaptionPosition.Horizontal" Caption="Booking information">
            <DxFormLayoutItem Caption="City:">
                <DxTextBox Text="Sydney"></DxTextBox>
            </DxFormLayoutItem>
            @* ... *@
        </DxFormLayoutTabPage>
        <DxFormLayoutTabPage CaptionPosition="CaptionPosition.Vertical" Caption="Chosen Dates">
            @* ... *@
        </DxFormLayoutTabPage>
    </DxFormLayoutTabPages>
</DxFormLayout>

Caption position for tabs

Run Demo: Form Layout - Caption Position

See Also