Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxFormLayout.ItemCaptionAlignment Property

Specifies how caption paddings are calculated in the Form Layout component.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(ItemCaptionAlignment.InGroups)]
[Parameter]
public ItemCaptionAlignment ItemCaptionAlignment { get; set; }

#Property Value

Type Default Description
ItemCaptionAlignment InGroups

An ItemCaptionAlignment enumeration value.

Available values:

Name Description
None

The caption width is equal to the width of its content.

InGroups

The width of all the captions in a group is set to the width of the longest caption in this group.

All

The width of all the captions in Form Layout is set to the width of the longest caption in the component.

#Remarks

Use the ItemCaptionAlignment property to specify how the paddings are calculated between the captions and corresponding editors.

The following code snippet sets the ItemCaptionAlignment property to All.

Razor
<DxFormLayout ItemCaptionAlignment="ItemCaptionAlignment.All">
    <DxFormLayoutGroup Caption="Personal information">
        <DxFormLayoutItem Caption="Full Name:">
            <DxTextBox Text="Mary Smith" />
        </DxFormLayoutItem>
        @* ... *@
    </DxFormLayoutGroup>
    <DxFormLayoutGroup Caption="Employment Information">
        @* ... *@
    </DxFormLayoutGroup>
</DxFormLayout>

All captions alignment

In the following example, the ItemCaptionAlignment property is set to InGroups:

In groups captions alignment

In the following example, the ItemCaptionAlignment property is set to None:

No captions alignment

See Also