Skip to main content
A newer version of this page is available. .
Tab

MenuSettingsAdaptivity.EnableCollapseRootItemsToIcons Property

Allows you to hide menu root item texts (and display only icons) when you minimize the browser window’s width.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

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

Property Value

Type Default Description
Boolean **false**

true, to hide item texts; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to EnableCollapseRootItemsToIcons
ASP.NET Controls and MVC Extensions ASPxMenu
.SettingsAdaptivity.EnableCollapseRootItemsToIcons
MenuSettings
.SettingsAdaptivity.EnableCollapseRootItemsToIcons
MVCxMenu
.SettingsAdaptivity.EnableCollapseRootItemsToIcons
ASP.NET Bootstrap Controls BootstrapMenu
.SettingsAdaptivity.EnableCollapseRootItemsToIcons
BootstrapMenuBase
.SettingsAdaptivity.EnableCollapseRootItemsToIcons
BootstrapToolbar
.SettingsAdaptivity.EnableCollapseRootItemsToIcons

Remarks

The EnableCollapseRootItemsToIcons property is in effect if the MenuSettingsAdaptivity.Enabled property is set to true.

The ASPxMenu hides menu root item texts (and displays only icons) when you minimize the browser window’s width (MenuSettingsAdaptivity.CollapseRootItemsToIconsAtWindowInnerWidth property).

MenuSettingsAdaptivity-EnableCollapseRootItemsToIcons

<dx:ASPxMenu ID="ASPxMenu1" runat="server">
    <SettingsAdaptivity Enabled="True" EnableCollapseRootItemsToIcons="True" />
        <Items>
            <dx:MenuItem Name="Home" Text="Home">
                <Items>
                    <dx:MenuItem Name="Profile" Text="Profile" />
                    <dx:MenuItem Name="Settings" Text="Settings" />
                    <dx:MenuItem Name="Exit" Text="Exit" />
                </Items>
                <Image Height="24px" Url="~/Content/Images/Home.svg" Width="24px" />
            </dx:MenuItem>
            <!--...-->
        </Items>
</dx:ASPxMenu>

Note

When the browser window’s width reaches the specified value (MenuSettingsAdaptivity.CollapseRootItemsToIconsAtWindowInnerWidth), ASPxMenu displays an empty item if the item’s icon is not specified.

See Also