DxFormLayout.CaptionPosition Property
In This Article
Specifies an item’s Caption position.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
C#
[DefaultValue(CaptionPosition.Horizontal)]
[Parameter]
public CaptionPosition CaptionPosition { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Caption |
Horizontal | A Caption |
Available values:
Name | Description |
---|---|
Vertical | Displays the caption above the associated editor. |
Horizontal | Displays the caption to the left of the associated editor. |
#Remarks
Form Layout can display a caption above an item or at its left. Use CaptionPosition
properties to position item captions. Individual settings have higher priority.
Positioned Elements | Property |
---|---|
A single caption. | Dx |
All captions in a group. | Dx |
All captions in a tab. | Dx |
All captions in all tabs. | Dx |
All captions in the component. | Dx |
If there is not enough space for the caption, Form Layout moves it above the associated editor (the Vertical
position) regardless of the CaptionPosition
property value.
Razor
<DxFormLayout CaptionPosition="CaptionPosition.Vertical">
<DxFormLayoutItem Caption="Location:" ColSpanMd="12">
<DxTextBox />
</DxFormLayoutItem>
<DxFormLayoutItem Caption="Check in:" >
<DxDateEdit Date="DateTime.Today" />
</DxFormLayoutItem>
<DxFormLayoutItem Caption="Check in:">
<DxDateEdit Date="DateTime.Today.AddDays(5)" />
</DxFormLayoutItem>
</DxFormLayout>
See Also