MahApps.Metro by Jan Karger, Dennis Daume, Brendan Forster, Paul Jenkins, Jake Ginnivan, Alex Mitchell

<PackageReference Include="MahApps.Metro" Version="2.1.1" />

.NET API 3,425,904 bytes

 HamburgerMenu

public class HamburgerMenu : ContentControl
The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items.

Identifies the CanResizeOpenPane dependency property.

Identifies the CompactPaneLength dependency property.

Identifies the ContentTransition dependency property.

public static readonly DependencyProperty DisplayModeProperty

Identifies the DisplayMode dependency property.

public static readonly RoutedEvent HamburgerButtonClickEvent

Identifies the HamburgerButtonClick routed event.

Identifies the HamburgerButtonHelpText dependency property.

Identifies the HamburgerButtonName dependency property.

Identifies the HamburgerButtonStyle dependency property.

Identifies the HamburgerButtonTemplate dependency property.

Identifies the HamburgerHeight dependency property.

Identifies the HamburgerMargin dependency property.

Identifies the HamburgerMenuHeaderTemplate dependency property.

Identifies the HamburgerVisibility dependency property.

Identifies the HamburgerWidth dependency property.

Identifies the HeaderItemContainerStyle dependency property.

public static readonly DependencyProperty IsPaneOpenProperty

Identifies the IsPaneOpen dependency property.

public static readonly RoutedEvent ItemClickEvent

Identifies the ItemClick routed event.

Identifies the ItemCommandParameter dependency property.

public static readonly DependencyProperty ItemCommandProperty

Identifies the ItemCommand dependency property.

Identifies the ItemContainerStyle dependency property.

Identifies the ItemFocusVisualStyle dependency property.

Identifies the ItemFocusVisualStyle dependency property.

public static readonly RoutedEvent ItemInvokedEvent

Identifies the ItemInvoked routed event.

public static readonly DependencyProperty ItemsSourceProperty

Identifies the ItemsSource dependency property.

Identifies the ItemTemplate dependency property.

Identifies the ItemTemplateSelector dependency property.

Identifies the MaximumOpenPaneLength dependency property.

Identifies the MinimumOpenPaneLength dependency property.

Identifies the OpenPaneLength dependency property.

public static readonly RoutedEvent OptionsItemClickEvent

Identifies the OptionsItemClick routed event.

Identifies the OptionsItemCommandParameter dependency property.

Identifies the OptionsItemCommand dependency property.

Identifies the OptionsItemContainerStyle dependency property.

Identifies the OptionsItemsSource dependency property.

Identifies the OptionsItemTemplate dependency property.

Identifies the OptionsItemTemplateSelector dependency property.

Identifies the OptionsVisibility dependency property.

Identifies the PaneBackground dependency property.

Identifies the PaneForeground dependency property.

Identifies the PaneHeaderMargin dependency property.

public static readonly DependencyProperty PaneMarginProperty

Identifies the PaneMargin dependency property.

Identifies the PanePlacement dependency property.

Identifies the ResizeThumbStyle dependency property.

Identifies the SelectedIndex dependency property.

Identifies the SelectedItem dependency property.

Identifies the SelectedOptionsIndex dependency property.

Identifies the SelectedOptionsItem dependency property.

Identifies the SeparatorItemContainerStyle dependency property.

Identifies the ShowSelectionIndicator dependency property.

Identifies the VerticalScrollBarOnLeftSide dependency property.

public bool CanResizeOpenPane { get; set; }

Gets or Sets whether the open pane can be resized by the user. The default value is false.

public double CompactPaneLength { get; set; }

Gets or sets the width of the pane when in its compact display mode.

public TransitionType ContentTransition { get; set; }

Gets or sets the TransitionType for the TransitioningContentControl which shows the selected menu item content.

public SplitViewDisplayMode DisplayMode { get; set; }

Gets or sets a value that specifies how the pane and content areas are shown.

public string HamburgerButtonHelpText { get; set; }

Gets or sets the HelpTextProperty for the HamburgerMenu button.

public string HamburgerButtonName { get; set; }

Gets or sets the NameProperty for the HamburgerMenu button.

public Style HamburgerButtonStyle { get; set; }

Gets or sets the Style for the HamburgerMenu button.

Gets or sets the ContentTemplate for the HamburgerMenu button.

public double HamburgerHeight { get; set; }

Gets or sets the Height for the HamburgerMenu button.

public Thickness HamburgerMargin { get; set; }

Gets or sets the margin for the HamburgerMenu button.

Gets or sets the ContentTemplate for the HamburgerMenu pane header.

public Visibility HamburgerVisibility { get; set; }

Gets or sets the Visibility for the HamburgerMenu button.

public double HamburgerWidth { get; set; }

Gets or sets HamburgerMenu button's Width.

public Style HeaderItemContainerStyle { get; set; }

Gets or sets the Style used for each header item.

public bool IsPaneOpen { get; set; }

Gets or sets a value indicating whether the pane is expanded to its full width.

public ICommand ItemCommand { get; set; }

Gets or sets a ICommand which will be executed if an item was clicked by the user.

public object ItemCommandParameter { get; set; }

Gets or sets the ICommand parameter which will be passed by the ItemCommand.

public Style ItemContainerStyle { get; set; }

Gets or sets the Style used for each item.

public Style ItemFocusVisualStyle { get; }

Gets or sets the default FocusVisualStyle for a HamburgerMenuItem. This style can be override at the HamburgerMenuItem style by setting the FocusVisualStyle property.

public ItemCollection Items { get; }

Gets the collection used to generate the content of the items list.

public object ItemsSource { get; set; }

Gets or sets an object source used to generate the content of the menu.

public DataTemplate ItemTemplate { get; set; }

Gets or sets the DataTemplate used to display each item.

Gets or sets the DataTemplateSelector used to display each item.

public double MaximumOpenPaneLength { get; set; }

Gets or sets the maximum width of the SplitView pane when it's fully expanded.

public double MinimumOpenPaneLength { get; set; }

Gets or sets the minimum width of the SplitView pane when it's fully expanded.

public double OpenPaneLength { get; set; }

Gets or sets the width of the pane when it's fully expanded.

public ICommand OptionsItemCommand { get; set; }

Gets or sets a ICommand which will be executed if an options item was clicked by the user.

public object OptionsItemCommandParameter { get; set; }

Gets or sets the ICommand parameter which will be passed by the OptionsItemCommand.

public Style OptionsItemContainerStyle { get; set; }

Gets or sets the Style used for each item in the options.

public ItemCollection OptionsItems { get; }

Gets the collection used to generate the content of the option list.

public object OptionsItemsSource { get; set; }

Gets or sets an object source used to generate the content of the options.

public DataTemplate OptionsItemTemplate { get; set; }

Gets or sets the DataTemplate used to display each item in the options.

Gets or sets the DataTemplateSelector used to display each item in the options.

public Visibility OptionsVisibility { get; set; }

Gets or sets the Visibility of the options menu.

public Brush PaneBackground { get; set; }

Gets or sets the Brush to apply to the background of the pane area of the HamburgerMenu.

public Brush PaneForeground { get; set; }

Gets or sets the Brush to apply to the foreground of the pane area of the HamburgerMenu.

public Thickness PaneHeaderMargin { get; set; }

Gets or sets the margin for the pane header.

public Thickness PaneMargin { get; set; }

Gets or sets the margin for the SplitView pane.

Gets or sets a value that specifies whether the pane is shown on the right or on left side of the HamburgerMenu.

public Style ResizeThumbStyle { get; set; }

Gets or Sets the Style for the resizing Thumb (type of MetroThumb)

public int SelectedIndex { get; set; }

Gets or sets the selected menu index.

public object SelectedItem { get; set; }

Gets or sets the selected menu item.

public int SelectedOptionsIndex { get; set; }

Gets or sets the selected options menu index.

public object SelectedOptionsItem { get; set; }

Gets or sets the selected options menu item.

public Style SeparatorItemContainerStyle { get; set; }

Gets or sets the Style used for each separator item.

public bool ShowSelectionIndicator { get; set; }

Gets or sets whether a selection indicator will be shown on the HamburgerMenuItem.

public bool VerticalScrollBarOnLeftSide { get; set; }

Gets or sets whether the ScrollBar of the HamburgerMenu is on the left side or on the right side of the menu items.

Event raised when the hamburger button is clicked

Event raised when an item is clicked

Event raised when an item is invoked

Event raised when an options' item is clicked

public HamburgerMenu()

Initializes a new instance of the HamburgerMenu class.

public void RaiseItemCommand()

Executes the ItemCommand.

Executes the OptionsItemCommand.