Problem with custom swipe for closing Sidebar

Hello fusers.
I observe a strange behavior for the sidebar. The task is to make sure that it would close when I swipe right-to-left on right panel, but it only works the second time. Can someone suggest a better version? Current implementation:

<EdgeNavigator ux:Name="EdgeNavigator">
    <Panel Width="80" ux:Name="menu" EdgeNavigation.Edge="Left" Background="#000">
            <Change rootTranslation.X="80"/>

    <DockPanel ux:Name="root" Color="Red">
        <Translation ux:Name="rootTranslation"/>

        <StatusBarBackground Dock="Top"/>

        <SwipeGesture ux:Name="swipe" Direction="Left" Type="Simple"/>
        <SwipingAnimation Source="swipe">


I’ve just tried it and it closes every time I swipe.

You should however use a Swiped trigger instead of SwipingAnimation. It’s generally not a good idea to put trigger actions inside “…Animation” like triggers. They may activate multiple times if the user swipes back/forth.