I have the following (where SideNav
is a class for the side bar):
<EdgeNavigator>
<SideNav Edge="Left">...</SideNav>
<Panel ux:Name="mainPanel">
...
<PageControl>
<Page>...</Page>
<Page>...</Page>
</PageControl>
</Panel>
</EdgeNavigator>
Sometimes when swiping for the page control the EdgeNavigator
may activate, I have a button that will navigate to the SideNav
So I want to restrict navigation only to that button instead of swiping. So is there a way to easily disable the SwipeGesture
of the EdgeNavigator
If you don’t want to swipe into the side menu then I suggest you just implement it as a regular Panel+LinearNavigation, which by default doesn’t listen to any swipes.
But how would I have the SideNav
able to appear from anywhere?
You could try with something like this if you want to use a Button
:
<App Theme="Basic">
<Panel>
<Panel Width="150" Color="#f58" ux:Name="sidePanel" Opacity="0.8" Alignment="Left">
<Translation X="-1" RelativeTo="Size" />
</Panel>
<WhileTrue ux:Name="showPanel">
<Move Target="sidePanel" X="1" RelativeTo="Size" Duration="0.3" Easing="QuadraticInOut" />
</WhileTrue>
<Button Text="Toggle" Alignment="Center">
<Clicked>
<Toggle Target="showPanel" />
</Clicked>
</Button>
</Panel>
</App>