Skip to content

Customising HamburgerMenu #3239

@NZSmartie

Description

@NZSmartie

The HamburgerMenu is designed for Windows Metro theme. But lacks the ability to customise (i guess themes it up) for MaterialDesign.

For example, MaterialDesign's Navigation Drawer uses a separate colour for the hamburger menu button and the menu items
image

Looking at

<Button x:Name="HamburgerButton"
Width="{TemplateBinding HamburgerWidth}"
Height="{TemplateBinding HamburgerHeight}"
Margin="0 0 0 8"
Padding="{TemplateBinding HamburgerMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Top"
AutomationProperties.Name="Main button"
ContentTemplate="{TemplateBinding HamburgerMenuTemplate}"
Foreground="{TemplateBinding PaneForeground}"
IsTabStop="{TemplateBinding IsTabStop}"
Style="{StaticResource HamburgerButtonStyle}"
TabIndex="0"
Visibility="{TemplateBinding HamburgerVisibility}" />
the Style is staticly linked and does not allow for customising in an application.

Ideally, i would like to override or derive HamburgerButtonStyle to assign a custom background colour (to match the toolbar).

Could also use this as an opportunity for the other staticly linked resources in the HamBurgerMenu as well for further customisations.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions