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

HamburgerSubMenu Class

Represents a button with an icon in the HamburgerMenu that provides access to a Sub Menu.

Namespace: DevExpress.Xpf.WindowsUI

Assembly: DevExpress.Xpf.Controls.v18.2.dll

Declaration

public class HamburgerSubMenu :
    ContentControl,
    IHamburgerMenuItem,
    IHamburgerMenuItemBase,
    IVisualItem,
    ISupportStandaloneSelection,
    ISupportSelection,
    ISupportOwner<HamburgerMenu>,
    IGlyphElement,
    IHamburgerMenuFlyoutItem

Remarks

The HamburgerSubMenu control is a button in the HamburgerMenu that invokes a flyout panel with a click. Use the HamburgerMenu.Items collection to add the HamburgerSubMenu to the HamburgerMenu.

The flyout panel displays items of the sub menu. To specify the collection of sub-menu items, use the HamburgerSubMenu.Items property.

You can display sub menu items in a preview directly in the main menu below the sub menu button. To add a sub menu item to the preview, set its HamburgerSubMenuNavigationButton.ShowInPreview property to true.

The markup below illustrates how to implement a HamburgerMenu with a sub menu.

<dx:ThemedWindow x:Class="DXApplication1.MainWindow"
                 xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
                 xmlns:dxwuin="http://schemas.devexpress.com/winfx/2008/xaml/windowsui/navigation"
                 mc:Ignorable="d"
                 Title="MainWindow">
    <dxwui:HamburgerMenu>
        <dxwui:HamburgerSubMenu Content="Menu" Glyph="Icons/Menu.png">
            <dxwui:HamburgerSubMenu.Items>
                <dxwui:HamburgerSubMenuNavigationButton Content="MenuSubItem 1" PreviewContent="PreviewItem 1" ShowInPreview="True" SelectOnClick="False" RightContent="RC"/>
                <dxwui:HamburgerSubMenuNavigationButton Content="MenuSubItem 2" PreviewContent="PreviewItem 2" ShowInPreview="True" SelectOnClick="False"/>
                <dxwui:HamburgerSubMenuNavigationButton Content="MenuSubItem 3"/>
                <dxwui:HamburgerSubMenuNavigationButton Content="MenuSubItem 4" ShowPreviewMark="True"/>
            </dxwui:HamburgerSubMenu.Items>
        </dxwui:HamburgerSubMenu>
    </dxwui:HamburgerMenu>
</dx:ThemedWindow>
See Also