Skip to main content

DxFormLayoutItem.CaptionCssClass Property

Specifies the name of the CSS class applied to the layout item’s caption.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public string CaptionCssClass { get; set; }

Property Value

Type Default Description
String null

The CSS class name.


To define the appearance of the layout item’s caption, assign a CSS class name to the CaptionCssClass property.

    .my-style {
        <!-- your CSS rules -->

    .my-style-caption {
        <!-- your CSS rules -->

<DxFormLayout Data="@MyDataSource">
    <DxFormLayoutItem Field="Name" Caption="Contact Name:" ColSpanMd="12" CssClass="my-style" />
    <DxFormLayoutItem Caption="Email:" ColSpanMd="12" CaptionCssClass="my-style-caption">
        <DxTextBox @bind-Text="@MyDataSource.Email"></DxTextBox>

    public class DataSource {
        public string Name { get; set; } = "Nancy Davolio";
        public string Email { get; set; } = "";
    DataSource MyDataSource = new DataSource();

To customize the appearance of the layout item’s entire content, use the CssClass property.

For more information, see the following help topic: CSS Classes.

See Also