Skip to main content

DxMenu.HamburgerButtonPosition Property

Specifies the hamburger button’s position.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(MenuHamburgerButtonPosition.Default)]
[Parameter]
public MenuHamburgerButtonPosition HamburgerButtonPosition { get; set; }

Property Value

Type Default Description
MenuHamburgerButtonPosition Default

A MenuHamburgerButtonPosition enumeration value.

Available values:

Name Description
Default

Mobile and tablet devices display this button at the right edge of the menu panel.
Other device types display the button at the left edge of the menu panel.
Depends on the DisplayMode property value.

Left

The button is placed at the left edge of the menu panel.

Right

The button is placed closer to the right edge of the menu panel.

Reverse

Mobile and tablet devices display this button at the left edge of the menu panel.
Other devices display the button at the right edge of the menu panel.
Depends on the DisplayMode property value.

Remarks

Menu items can be displayed in a hamburger menu in two cases:

  • If you set the DisplayMode to Mobile and set the Orientation to Horizontal.

  • If you set the DisplayMode to Desktop and set the CollapseItemsToHamburgerMenu property to true, menu items are collapsed into a hamburger menu when the width of the browser window changes and there is not enough space to display the items in the menu panel.

You can use the HamburgerButtonPosition and HamburgerIconCssClass properties to change the hamburger button’s position and icon.

<div class="card w-auto">
    <DxMenu Title="DevExpress"
            CollapseItemToIconMode="MenuCollapseItemToIconMode.Sequentially"
            CollapseItemsToHamburgerMenu="true"
            HamburgerButtonPosition="MenuHamburgerButtonPosition.Right"
            HamburgerIconCssClass="oi oi-menu">
        <Items>
            <DxMenuItem Text="Products" IconCssClass="oi oi-layers" />
            <DxMenuItem Text="Support" IconCssClass="oi oi-person" />
            <DxMenuItem Text="Documentation" IconCssClass="oi oi-book" />
            <DxMenuItem Text="Demos" IconCssClass="oi oi-monitor" />
            <DxMenuItem Text="Blogs" IconCssClass="oi oi-bell" />
            <DxMenuItem Text="Search" IconCssClass="oi oi-magnifying-glass" />
        </Items>
    </DxMenu>
</div>

Hamburger Button Position

Watch Video

See Also