I'm trying to implement a slide gesture to open/close the hamburguer menu control, but I'm having trouble closing the menu with version 1.5.1 of the control. With version 1.4.1 I close the menu this way:
var paneGrid = HamburgerMenu.FindDescendantByName("PaneGrid") as Grid;
paneGrid.ManipulationMode = ManipulationModes.TranslateX;
paneGrid.ManipulationCompleted += OnPaneGridManipulationCompleted;
private void OnPaneGridManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e) {
if (e.Cumulative.Translation.X < -50) {
HamburgerMenu.IsPaneOpen = false;
}
}
But with version 1.5.1 the listviews take all space in the control and "OnPaneGridManipulationCompleted" does not get fired... any ideas please?
You can try setting both
HorizontalScrollMode
andVerticalScrollMode
toDisabled
on theListView
's innerScrollViewer
to let touch input bypass it.Since the default value of
HorizontalScrollMode
is alreadyDisabled
. You just need to manually set theVerticalScrollMode
as belowThe side effect is that you can no longer scroll the
ListView
vertically. But generally you wouldn't want that(bad design) anyway.You might also be interested in this answer of mine. :)