DxDropDown.BodyCssClass Property
Specifies the CSS class applied to the window body.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v23.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public string BodyCssClass { get; set; }
Property Value
Type | Description |
---|---|
String | A CSS class name. |
Remarks
Assign the CSS class name to the BodyCssClass
property to customize the drop-down window’s body appearance. Use the BodyText property to specify text displayed in the drop-down window body.
<style>
.body-style {
background-color: lightblue;
}
</style>
<DxButton Id="showDDbtton" Click="() => IsOpen = true">Show Window</DxButton>
<DxDropDown BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
Width="400"
@bind-IsOpen="@IsOpen"
PositionTarget="#showDDbtton"
PositionMode="DropDownPositionMode.Bottom"
BodyCssClass="body-style"
HeaderVisible="true"
HeaderText="Header"
FooterVisible="true"
FooterText="Footer">
</DxDropDown>
@code {
bool IsOpen { get; set; } = false;
}
When you use the BodyTextTemplate or BodyTemplate, specified appearance settings take priority over appearance settings defined in the assigned CSS class.
For more information on how to apply CSS classes to DevExpress Blazor components, refer to the following help topic: CSS Classes.
See Also