DxMenu.HamburgerButtonPosition Property
Specifies the hamburger button’s position.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.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. |
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. |
Remarks
Menu items can be displayed in a hamburger menu in two cases:
If you set the DisplayMode to
Mobile
and set the Orientation toHorizontal
.If you set the DisplayMode to
Desktop
and set the CollapseItemsToHamburgerMenu property totrue
, 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>