Skip to main content
All docs
V23.2

DxListBox<TData, TValue>.CssClass Property

Specifies the name of a CSS class applied to the List Box.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public string CssClass { get; set; }

Property Value

Type Description
String

The CSS class name.

Remarks

The code below changes the font weight of List Box items.

@using StaffData

<DxListBox Data="@Staff.DataSource"
           @bind-Values="@Values"
           CssClass="my-style">
    <Columns>
        <DxListEditorColumn FieldName="FirstName" Caption="Name"  VisibleIndex="2"/>
        <DxListEditorColumn FieldName="LastName" Caption="Surname" />
    </Columns>
</DxListBox>

@code {
    IEnumerable<Person> Values { get; set; } = Staff.DataSource.Take(1);
}

<style>
    .my-style {
        font-weight: 700;
    }
</style>

List Box - CssClass

Implements

DevExpress.Blazor.IListBox<TData, TValue>.CssClass
See Also