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

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.Xpf.WindowsUI

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Controls, DevExpress.Wpf.Navigation

Declaration

public class HamburgerMenuNavigationButton :
    HamburgerMenuNavigationButton<HamburgerMenu>,
    IHamburgerMenuItem,
    IHamburgerMenuItemBase,
    IVisualItem,
    IGlyphElement

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.

The example below illustrates how to specify a template for the HamburgerMenuNavigationButton based on the MVVM design pattern.

             <DataTemplate DataType="{x:Type local:HamburgerNavigationItemViewModel}">
                <dxwui:HamburgerMenuNavigationButton Content="{Binding Content}"
                                                     Glyph="{Binding Icon}"
                                                     dxb:ImageColorizer.IsEnabled="True"
                                                     GlyphWidth="24"
                                                     GlyphHeight="24"
                                                     dxb:ImageColorizer.Color="{Binding Foreground.Color, RelativeSource={RelativeSource Self}}"
                                                     Placement="{Binding Placement}"
                                                     HideMenuWhenSelected="{Binding HideMenuWhenSelected}"
                                                     SelectOnClick="{Binding SelectOnClick}"
                                                     Command="{Binding Command}"
                                                     CommandParameter="{Binding CommandParameter}"
                                                     NavigationTargetType="{Binding NavigationTargetType}" />
            </DataTemplate>

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.

Inheritance

Show 15 items
Object
DispatcherObject
DependencyObject
Visual
UIElement
FrameworkElement
Control
ContentControl
ButtonBase
Button
DevExpress.Xpf.WindowsUI.Internal.HamburgerMenuButtonBase<HamburgerMenu>
HamburgerMenuNavigationButtonBase<HamburgerMenu>
DevExpress.Xpf.WindowsUI.Internal.HamburgerMenuSelectableNavigationButtonBase<HamburgerMenu>
HamburgerMenuNavigationButton<HamburgerMenu>
HamburgerMenuNavigationButton
See Also