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

HamburgerMenuNavigationButton Class

Represents a button with an icon in the Main Menu of the HamburgerMenu that navigates to the specified page with a click.

Namespace: DevExpress.UI.Xaml.Layout

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

Declaration

[TemplatePart(Name = "PART_Content", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_IconBorder", Type = typeof(Border))]
[TemplatePart(Name = "PART_RightContent", Type = typeof(ContentControl))]
public class HamburgerMenuNavigationButton :
    HamburgerMenuSelectableNavigationIconButton,
    IHamburgerMenuItem,
    ISplitCollectionItem,
    IVisualItem,
    IHamburgerMenuNavigationItem,
    ISelectableHamburgerMenuItem,
    ISelectable,
    INavigationItem,
    ISupportNavigationTarget,
    IItemsSourceControllerItem,
    IHamburgerMenuSupportCompactWidth,
    ISupportOwner<HamburgerMenu>,
    IColorSchemeEditorSupport
<TemplatePart(Name:="PART_Content", Type:=GetType(ContentPresenter))>
<TemplatePart(Name:="PART_IconBorder", Type:=GetType(Border))>
<TemplatePart(Name:="PART_RightContent", Type:=GetType(ContentControl))>
Public Class HamburgerMenuNavigationButton
    Inherits HamburgerMenuSelectableNavigationIconButton
    Implements IHamburgerMenuItem,
               ISplitCollectionItem,
               IVisualItem,
               IHamburgerMenuNavigationItem,
               ISelectableHamburgerMenuItem,
               ISelectable,
               INavigationItem,
               ISupportNavigationTarget,
               IItemsSourceControllerItem,
               IHamburgerMenuSupportCompactWidth,
               ISupportOwner(Of HamburgerMenu),
               IColorSchemeEditorSupport

Remarks

The HamburgerMenuNavigationButton represents a button in the HamburgerMenu. To add a button to the HamburgerMenu, use the menu's HamburgerMenu.Items collection, or declare buttons between the HamburgerMenu's opening and closing tags.

When an end-user clicks or taps the button, the application navigates to the associated target page. You specify the target page using the NavigationTargetType or NavigationTargetTypeName property. The NavigationTargetParameter property specifies the navigation parameter to pass to the target page.

The HamburgerMenuNavigationButton is a content control. Typically, you specify a string caption using the button's Content property. However, you can use custom objects to specify the button content, and make use of the ContentTemplate property to visualize the content.

In addition to the content, the HamburgerMenuNavigationButton supports icons, which can be specified with the Icon property. The code below shows how to declare buttons in XAML.

xmlns:local="using:HamburgerMenuDemo" 
xmlns:Layout="using:DevExpress.UI.Xaml.Layout" 

 <Layout:HamburgerMenu.Items> 

     <!-- The page to which the button navigates to is specified with the NavigationTargetType property --> 
     <Layout:HamburgerMenuNavigationButton Content="New Mail" NavigationTargetType="local:HamburgerMenuDemo_NewMailPage" HideMenuWhenSelected="True"> 
         <Layout:HamburgerMenuNavigationButton.Icon> 
             <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE710;" /> 
         </Layout:HamburgerMenuNavigationButton.Icon> 
     </Layout:HamburgerMenuNavigationButton> 

     <!-- The page to which the button navigates to is specified with the NavigationTargetTypeName property --> 
     <Layout:HamburgerMenuNavigationButton Content="Home" IsSelected="True" NavigationTargetTypeName="HomePage"> 
         <Layout:HamburgerMenuNavigationButton.Icon> 
             <SymbolIcon Symbol="Home"/> 
         </Layout:HamburgerMenuNavigationButton.Icon> 
     </Layout:HamburgerMenuNavigationButton> 

 </Layout:HamburgerMenu.Items>

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
HamburgerMenuNavigationIconButton
DevExpress.UI.Xaml.Layout.Internal.HamburgerMenuSelectableNavigationIconButton
HamburgerMenuNavigationButton
See Also