Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HamburgerMenu control: still just a demo? #3106

Closed
netsrotr opened this issue Nov 19, 2017 · 0 comments · Fixed by #3148
Closed

HamburgerMenu control: still just a demo? #3106

netsrotr opened this issue Nov 19, 2017 · 0 comments · Fixed by #3148
Assignees
Labels
Milestone

Comments

@netsrotr
Copy link

netsrotr commented Nov 19, 2017

Examining the source code of HamburgerMenu.cs really made my day, after look for many hours for a solution to just provide a simple content without using the contenttemplate (that makes data binding within "real" content views a hassle and could not get tit work in my case).
It has assigned (and re-assigned again within OnApplyTemplate() every time) a event handler to the Loaded event of the control to assign the SelectedItem (usually a inherited class of HamburgerMenuItem) to it's own Content Dependency property and so destroy the content grid "ContentGrid" I assigned via XAML like this:
<controls:HamburgerMenu x:Name="HamburgerMenuControl"> <controls:HamburgerMenu.Content> <Grid x:Name="ContentGrid">...

So: is this code really needed? Or is it just a "forgotten code fragment" from copied demo code ?
My current workaround/hack looks like this:
private void HamburgerMenu_OnItemClick(object sender, ItemClickEventArgs e) { ... HamburgerMenuControl.SetCurrentValue(HamburgerMenu.ContentProperty, ContentGrid); ...}

EDIT: Issue 3089 describes exactly the behavior of the problem above but a different use case.

@punker76 punker76 added this to the 1.6.0 milestone Jan 14, 2018
@punker76 punker76 self-assigned this Jan 14, 2018
@punker76 punker76 added the Bug label Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants