Summary
The HamburgerMenu is based on a SplitView control. By default it contains a HamburgerButton and a ListView to display menu items.
- Namespace
- MahApps
.Metro .Controls - Base Types
-
- ContentControl
graph BT
Type-->Base0["ContentControl"]
Type["HamburgerMenu"]
class Type type-node
Syntax
[TemplatePart(Name = "HamburgerButton", Type = typeof(Button))]
[TemplatePart(Name = "ButtonsListView", Type = typeof(ListBox))]
[TemplatePart(Name = "OptionsListView", Type = typeof(ListBox))]
public class HamburgerMenu : ContentControl
Attributes
Type | Description |
---|---|
TemplatePart | |
TemplatePart | |
TemplatePart |
Constructors
Name | Summary |
---|---|
HamburgerMenu |
Initializes a new instance of the HamburgerMenu class.
|
Events
Name | Type | Summary |
---|---|---|
HamburgerButtonClick | RoutedEventHandler |
Event raised when the hamburger button is clicked
|
ItemClick | Item |
Event raised when an item is clicked
|
ItemInvoked | Hamburger |
Event raised when an item is invoked
|
OptionsItemClick | Item |
Event raised when an options' item is clicked
|
Fields
Name | Constant Value | Summary |
---|---|---|
Compact |
Identifies the
CompactPaneLength dependency property.
static
|
|
Content |
Identifies the
ContentTransition dependency property.
static
|
|
DisplayModeProperty |
Identifies the
DisplayMode dependency property.
static
|
|
Hamburger |
static
|
|
Hamburger |
Identifies the
HamburgerButtonStyle dependency property.
static
|
|
Hamburger |
Identifies the
HamburgerButtonTemplate dependency property.
static
|
|
Hamburger |
Identifies the
HamburgerHeight dependency property.
static
|
|
Hamburger |
Identifies the
HamburgerMargin dependency property.
static
|
|
Hamburger |
Identifies the
HamburgerMenuHeaderTemplate dependency property.
static
|
|
Hamburger |
Identifies the
HamburgerVisibility dependency property.
static
|
|
Hamburger |
Identifies the
HamburgerWidth dependency property.
static
|
|
Header |
Identifies the
HeaderItemContainerStyle dependency property.
static
|
|
IsPaneOpenProperty |
Identifies the
IsPaneOpen dependency property.
static
|
|
ItemClickEvent |
static
|
|
Item |
Identifies the
ItemCommandParameter dependency property.
static
|
|
ItemCommandProperty |
Identifies the
ItemCommand dependency property.
static
|
|
Item |
Identifies the
ItemContainerStyle dependency property.
static
|
|
Item |
Identifies the
ItemFocusVisualStyle dependency property.
static
|
|
Item |
static
|
|
ItemInvokedEvent |
static
|
|
ItemsSourceProperty |
Identifies the
ItemsSource dependency property.
static
|
|
ItemTemplateProperty |
Identifies the
ItemTemplate dependency property.
static
|
|
Item |
Identifies the
ItemTemplateSelector dependency property.
static
|
|
Open |
Identifies the
OpenPaneLength dependency property.
static
|
|
Options |
static
|
|
Options |
Identifies the
OptionsItemCommandParameter dependency property.
static
|
|
Options |
Identifies the
OptionsItemCommand dependency property.
static
|
|
Options |
Identifies the
OptionsItemContainerStyle dependency property.
static
|
|
Options |
Identifies the
OptionsItemsSource dependency property.
static
|
|
Options |
Identifies the
OptionsItemTemplate dependency property.
static
|
|
Options |
Identifies the
OptionsItemTemplateSelector dependency property.
static
|
|
Options |
Identifies the
OptionsVisibility dependency property.
static
|
|
Pane |
Identifies the
PaneBackground dependency property.
static
|
|
Pane |
Identifies the
PaneForeground dependency property.
static
|
|
Pane |
Identifies the
PaneHeaderMargin dependency property.
static
|
|
PaneMarginProperty |
Identifies the
PaneMargin dependency property.
static
|
|
Pane |
Identifies the
PanePlacement dependency property.
static
|
|
Selected |
Identifies the
SelectedIndex dependency property.
static
|
|
SelectedItemProperty |
Identifies the
SelectedItem dependency property.
static
|
|
Selected |
Identifies the
SelectedOptionsIndex dependency property.
static
|
|
Selected |
Identifies the
SelectedOptionsItem dependency property.
static
|
|
Separator |
Identifies the
SeparatorItemContainerStyle dependency property.
static
|
|
Show |
Identifies the
ShowSelectionIndicator dependency property.
static
|
|
Vertical |
Identifies the
VerticalScrollBarOnLeftSide dependency property.
static
|
Properties
Name | Value | Summary |
---|---|---|
CompactPaneLength | double |
Gets or sets the width of the pane in its compact display mode.
|
ContentTransition | TransitionType | |
DisplayMode | SplitViewDisplayMode |
Gets or sets a value that specifies how the pane and content areas are shown.
|
HamburgerButtonStyle | Style |
Gets or sets the Style used for the hamburger button.
|
Hamburger |
DataTemplate |
Gets or sets a template for the hamburger button.
|
HamburgerHeight | double |
Gets or sets main button's height.
|
HamburgerMargin | Thickness |
Gets or sets main button's margin.
|
Hamburger |
DataTemplate |
Gets or sets a template for the hamburger pane header.
|
HamburgerVisibility | Visibility |
Gets or sets main button's visibility.
|
HamburgerWidth | double |
Gets or sets main button's width.
|
Header |
Style |
Gets or sets the Style used for each header item.
|
IsPaneOpen | bool |
Gets or sets a value indicating whether the pane is expanded to its full width.
|
ItemCommand | ICommand |
Gets or sets a command which will be executed if an item is clicked by the user.
|
ItemCommandParameter | object |
Gets or sets the command parameter which will be passed by the ItemCommand.
|
ItemContainerStyle | Style |
Gets or sets the Style used for each item.
|
ItemFocusVisualStyle | Style |
Gets or sets the default FocusVisualStyle for a HamburgerMenuItem.
This style can be override at the HamburgerMenuItem style by setting the FocusVisualStyle property.
|
Items | ItemCollection |
Gets the collection used to generate the content of the items list.
|
ItemsSource | object |
Gets or sets an object source used to generate the content of the menu.
|
ItemTemplate | DataTemplate |
Gets or sets the DataTemplate used to display each item.
|
ItemTemplateSelector | DataTemplateSelector |
Gets or sets the DataTemplateSelector used to display each item.
|
OpenPaneLength | double |
Gets or sets the width of the pane when it's fully expanded.
|
OptionsItemCommand | ICommand |
Gets or sets a command which will be executed if an options item is clicked by the user.
|
Options |
object |
Gets or sets the command parameter which will be passed by the OptionsItemCommand.
|
Options |
Style |
Gets or sets the Style used for each item in the options.
|
OptionsItems | ItemCollection |
Gets the collection used to generate the content of the option list.
|
OptionsItemsSource | object |
Gets or sets an object source used to generate the content of the options.
|
OptionsItemTemplate | DataTemplate |
Gets or sets the DataTemplate used to display each item in the options.
|
Options |
DataTemplateSelector |
Gets or sets the DataTemplateSelector used to display each item in the options.
|
OptionsVisibility | Visibility |
Gets or sets the visibility of the options menu.
|
PaneBackground | Brush |
Gets or sets the Brush to apply to the background of the Pane area of the control.
|
PaneForeground | Brush |
Gets or sets the Brush to apply to the foreground of the Pane area of the control.
|
PaneHeaderMargin | Thickness |
Gets or sets the margin for the pane header.
|
PaneMargin | Thickness |
Gets or sets the margin for the pane.
|
PanePlacement | Split |
Gets or sets a value that specifies whether the pane is shown on the right or left side of the control.
|
SelectedIndex | int |
Gets or sets the selected menu index.
|
SelectedItem | object |
Gets or sets the selected menu item.
|
SelectedOptionsIndex | int |
Gets or sets the selected options menu index.
|
SelectedOptionsItem | object |
Gets or sets the selected options menu item.
|
Separator |
Style |
Gets or sets the Style used for each separator item.
|
Show |
bool |
Gets or sets wheather a selection indicator will be shown on the HamburgerMenuItem.
|
Vertical |
bool |
Gets or sets wheather the ScrollBar of the HamburgerMenu is on the left side or on the right side.
|
Methods
Name | Value | Summary |
---|---|---|
OnApplyTemplate |
void |
Override default OnApplyTemplate to capture children controls
|
RaiseItemCommand |
void |
Executes the item command which can be set by the user.
|
Raise |
void |
Executes the options item command which can be set by the user.
|