I am creating a universal app with a HamburgerMenu
<Grid>
<SplitView x:Name="hMenu" IsPaneOpen="{Binding ElementName=hMenuBtn, Path=IsChecked}">
<SplitView.Pane>
<RelativePanel>
</RelativePanel>
</SplitView.Pane>
</SplitView>
<StackPanel Orientation="Horizontal" Height="48"
VerticalAlignment="Top" HorizontalAlignment="Stretch"
Background="{ThemeResource SystemControlBackgroundAccentBrush}">
<ToggleButton x:Name="hMenuBtn" VerticalAlignment="Stretch" Width="48"
HorizontalAlignment="Stretch">
</ToggleButton>
<TextBlock Foreground="White" Text="Control De Materiales"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
FontSize="20" Margin="10 20 0 0"/>
</StackPanel>
</Grid>
It works correctly, but pressing the ToogleButton
el Pane
opens abruptly without showing any transition.
I've tried to add it via TransitionCollection
, but I can't get it to work.
It should be done like this:
of course you can also try it from C# and it should work without mess.
However, remember that the apps are prepared for low end devices, therefore this uses a lot of energy and processing that you may not have. So if you're doing custom animations you should intentionally say that you'll run animations on dependent objects, and it's done this way:
EnableDependentAnimation="true"
on the animation object you're using:Hi, I use the template
navpanel
to automatically generate projects withsplitview
(sliding side menu), the same template includes the effects of the menu and transition between views.Nav Pane App Template (Universal Windows)