Skip to main content

DxMenuItem.Expanded Property

Specifies whether the item’s children are expanded.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(false)]
[Parameter]
public bool Expanded { get; set; }

Property Value

Type Default Description
Boolean false

true if the drop-down window is displayed; otherwise, false.

Remarks

Each Menu item can have multiple child items specified as elements of the parent item’s Items collection.

Use the Expanded property to show or hide the item’s children. Note that an item is visible when all its parent items are visible. To respond to item expand and collapse operations, handle the ExpandedChanged event.

<div class="card w-100">
    <div class="card-body p-0">
        <DxMenu Title="DevExpress" Orientation="Orientation.Vertical" DisplayMode="MenuDisplayMode.Mobile">
            <Items>
                <DxMenuItem Text="Home" Expanded="true" IconCssClass="menu-icon-home menu-icon">
                    <Items>
                        <DxMenuItem Text="News">
                            <Items>
                                <DxMenuItem Text="Explore our newest features" NavigateUrl="https://www.devexpress.com/support/versions.xml#version-history" target="_blank" />
                                <DxMenuItem Text="Website news" NavigateUrl="https://www.devexpress.com/aboutus/newsreviews/" target="_blank" />
                            </Items>
                        </DxMenuItem>
                        <DxMenuItem Text="Our Mission" NavigateUrl="https://www.devexpress.com/aboutus/" target="_blank" />
                        <DxMenuItem Text="Our Customers" NavigateUrl="https://www.devexpress.com/aboutus/testimonials/" target="_blank" />
                    </Items>
                </DxMenuItem>
                @* ... *@
            </Items>
        </DxMenu>
    </div>
</div>

Expanded Menu Items

See Also