Back to Devexpress

DxMenu.HamburgerButtonPosition Property

blazor-devexpress-dot-blazor-dot-dxmenu-9f9cd2a9.md

latest3.4 KB
Original Source

DxMenu.HamburgerButtonPosition Property

Specifies the hamburger button’s position.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDefaultDescription
MenuHamburgerButtonPositionDefault

A MenuHamburgerButtonPosition enumeration value.

|

Available values:

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

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

YouTube video

See Also

DxMenu Class

DxMenu Members

DevExpress.Blazor Namespace