DxStackLayout.ItemContainerCssClass Property
Specifies the name of a CSS class applied to the component’s inner container with items.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(null)]
[Parameter]
public string ItemContainerCssClass { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | null | The CSS class name. |
Remarks
The DxStackLayout component renders nested container elements. The top-level container includes the container that arranges items (the item container).
The ItemContainerCssClass
property allows you to apply CSS rules to the item container. For example, you can change the gap between elements. You can also apply the nth-child
selector to customize a specific layout item.
To specify style settings of the top-level container, use the DxComponentBase.CssClass property.
<DxStackLayout ItemContainerCssClass="item-container">
<Items>
<DxStackLayoutItem>
<Template>
<div class="stacklayout-header stacklayout-item">
Item 1
</div>
</Template>
</DxStackLayoutItem>
<DxStackLayoutItem Length="2fr">
<Template>
<div class="stacklayout-content stacklayout-item">
Item 2
</div>
</Template>
</DxStackLayoutItem>
<DxStackLayoutItem>
<Template>
<div class="stacklayout-left-side-bar stacklayout-item">
Item 3
</div>
</Template>
</DxStackLayoutItem>
<DxStackLayoutItem>
<Template>
<div class="stacklayout-right-side-bar stacklayout-item">
Item 4
</div>
</Template>
</DxStackLayoutItem>
<DxStackLayoutItem>
<Template>
<div class="stacklayout-footer stacklayout-item">
Item 5
</div>
</Template>
</DxStackLayoutItem>
</Items>
</DxStackLayout>
Refer to Css Classes for more information.