The requested page is not available for the requested platform. You are viewing the content for Default platform.

HamburgerSubMenu Class

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

Namespace: DevExpress.UI.Xaml.Layout

Assembly: DevExpress.UI.Xaml.Layout.v19.2.dll

Declaration

[ContentProperty(Name = "Items")]
[TemplatePart(Name = "PART_Header", Type = typeof(HamburgerSubMenuButton))]
[TemplatePart(Name = "PART_SubMenuFlyout", Type = typeof(HamburgerSubMenuFlyout))]
[TemplatePart(Name = "PART_Pane", Type = typeof(HamburgerSubMenuPane))]
[TemplatePart(Name = "PART_PreviewPanel", Type = typeof(HamburgerSubMenuItemPanel))]
[TemplatePart(Name = "PART_MoreButton", Type = typeof(HamburgerSubMenuMoreButton))]
public class HamburgerSubMenu :
    HamburgerMenuIconButton,
    IHamburgerMenuItem,
    ISplitCollectionItem,
    IVisualItem,
    IHamburgerMenuSupportCompactWidth,
    IHamburgerMenuSelectableItemsContainer,
    IItemsSourceControllerItem,
    ISupportPageHeader,
    ISupportOwner<HamburgerMenu>
<ContentProperty(Name:="Items")>
<TemplatePart(Name:="PART_Header", Type:=GetType(HamburgerSubMenuButton))>
<TemplatePart(Name:="PART_SubMenuFlyout", Type:=GetType(HamburgerSubMenuFlyout))>
<TemplatePart(Name:="PART_Pane", Type:=GetType(HamburgerSubMenuPane))>
<TemplatePart(Name:="PART_PreviewPanel", Type:=GetType(HamburgerSubMenuItemPanel))>
<TemplatePart(Name:="PART_MoreButton", Type:=GetType(HamburgerSubMenuMoreButton))>
Public Class HamburgerSubMenu
    Inherits HamburgerMenuIconButton
    Implements IHamburgerMenuItem,
               ISplitCollectionItem,
               IVisualItem,
               IHamburgerMenuSupportCompactWidth,
               IHamburgerMenuSelectableItemsContainer,
               IItemsSourceControllerItem,
               ISupportPageHeader,
               ISupportOwner(Of HamburgerMenu)

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 shows a sample sub-menu.

<Layout:HamburgerSubMenu Content="Folders">
    <Layout:HamburgerSubMenu.Icon>
        <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE8B7;" />
    </Layout:HamburgerSubMenu.Icon>
    <Layout:HamburgerSubMenu.Items>
        <Layout:HamburgerSubMenuNavigationButton Content="Outbox" RightContent="12" NavigationTargetType="local:HamburgerMenuDemo_OutboxPage"/>
        <Layout:HamburgerSubMenuNavigationButton Content="Inbox" RightContent="142" ShowInPreview="True" NavigationTargetType="local:HamburgerMenuDemo_InboxPage"/>
        <Layout:HamburgerSubMenuNavigationButton Content="Drafts" RightContent="2" ShowInPreview="True" NavigationTargetType="local:HamburgerMenuDemo_DraftsPage"/>
        <Layout:HamburgerSubMenuNavigationButton Content="Junk" NavigationTargetType="local:HamburgerMenuDemo_JunkPage"/>
        <Layout:HamburgerSubMenuNavigationButton Content="Sent" RightContent="452" ShowInPreview="True" PreviewContent="Sent Items" NavigationTargetType="local:HamburgerMenuDemo_SentPage"/>
        <Layout:HamburgerSubMenuNavigationButton Content="Trash" RightContent="15" NavigationTargetType="local:HamburgerMenuDemo_TrashPage"/>
    </Layout:HamburgerSubMenu.Items>
</Layout:HamburgerSubMenu>

Inheritance

Object
DependencyObject
Windows.UI.Xaml.UIElement
FrameworkElement
Control
Windows.UI.Xaml.Controls.ContentControl
Windows.UI.Xaml.Controls.Primitives.ButtonBase
Windows.UI.Xaml.Controls.Button
HamburgerMenuIconButton
HamburgerSubMenu
See Also