Back to Devexpress

MenuSettingsAdaptivity.EnableCollapseRootItemsToIcons Property

aspnet-devexpress-dot-web-dot-menusettingsadaptivity-cfa72431.md

latest3.0 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(false)]
public bool EnableCollapseRootItemsToIcons { get; set; }
vb
<DefaultValue(False)>
Public Property EnableCollapseRootItemsToIcons As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true, to hide item texts; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to EnableCollapseRootItemsToIcons
ASP.NET MVC ExtensionsMenuSettings

.SettingsAdaptivity .EnableCollapseRootItemsToIcons

| | ASP.NET Web Forms Controls | ASPxMenu |

.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).

aspx
<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>

See Also

MenuSettingsAdaptivity Class

MenuSettingsAdaptivity Members

DevExpress.Web Namespace