Hamburger Header Templating #2917

Merged
merged 3 commits into from Apr 5, 2017

Conversation

Projects
None yet
2 participants
@SilverDragon135
Contributor

SilverDragon135 commented Apr 3, 2017

Added hamburfer header templating support.
Template accessible trough "HamburgerMenu.HamburgerMenuHeaderTemplate".

I experienced little problem, that GridColumn ignored HamburgerWidth (not sure why), it is reason for this code (workaround):

<Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto"/>
      <ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Width="{TemplateBinding HamburgerWidth}" HorizontalAlignment="Left" />

istead of <ColumnDefinition Width="{TemplateBinding HamburgerWidth}"/>

I wanted to have possibility to add title to HamburgerMenu... Now it is possible for example this way:

<controls:HamburgerMenu.HamburgerMenuHeaderTemplate>
     <DataTemplate>
          <TextBlock Grid.Column="1"
                             VerticalAlignment="Center"
                             HorizontalAlignment="Center"
                             FontSize="16"
                             Foreground="White"
                             Text="Menu" />
      </DataTemplate>
</controls:HamburgerMenu.HamburgerMenuHeaderTemplate>

Result:
image

If there is any problem with naming. Let me know. :)

SilverDragon135 added some commits Apr 3, 2017

Hamburger Header Templating
Added hamburfer header templating support.
Template accessible trough "HamburgerMenu.HamburgerMenuHeaderTemplate".
Hamburger Header in samples
Edited sample to include Hamburger Header
@SilverDragon135

This comment has been minimized.

Show comment
Hide comment
@SilverDragon135

SilverDragon135 Apr 5, 2017

Contributor

Result of sample edit:
image

Contributor

SilverDragon135 commented Apr 5, 2017

Result of sample edit:
image

@punker76 punker76 added this to the 1.5.0 milestone Apr 5, 2017

@punker76 punker76 merged commit cd3ee4a into MahApps:develop Apr 5, 2017

1 check passed

continuous-integration/teamcity Finished TeamCity Build MahApps.Metro PullRequest :: MahApps.Metro PullRequests : Tests passed: 62
Details
@punker76

This comment has been minimized.

Show comment
Hide comment
Member

punker76 commented Apr 5, 2017

@SilverDragon135 👍 Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment