# Problem with custom swipe for closing Sidebar

**URL:** <https://forums.fusetools.com/t/problem-with-custom-swipe-for-closing-sidebar/4504>\
**Category:** How-to Discussions\
**Created:** [December 16, 2016, 1:44am UTC](https://forums.fusetools.com/t/problem-with-custom-swipe-for-closing-sidebar/4504 "2016-12-16T01:44:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxgraey](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/maxgraey/32/347_2.png) [@maxgraey](https://forums.fusetools.com/u/maxgraey)\
**Post date:** [December 16, 2016, 1:44am UTC](https://forums.fusetools.com/t/problem-with-custom-swipe-for-closing-sidebar/4504/1 "2016-12-16T01:44:35Z")

</div>

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:

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

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

        <StatusBarBackground Dock="Top"/>

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

```

---

<div class="post-metadata">

**Author:** ![maxgraey](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/maxgraey/32/347_2.png) [@maxgraey](https://forums.fusetools.com/u/maxgraey)\
**Post date:** [December 16, 2016, 9:51pm UTC](https://forums.fusetools.com/t/problem-with-custom-swipe-for-closing-sidebar/4504/2 "2016-12-16T21:51:13Z")

</div>

up

---

<div class="post-metadata">

**Author:** ![edA-qa\_mort-ora-y](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/eda-qa_mort-ora-y/32/124_2.png) [@edA-qa\_mort-ora-y](https://forums.fusetools.com/u/edA-qa_mort-ora-y)\
**Post date:** [December 17, 2016, 8:16am UTC](https://forums.fusetools.com/t/problem-with-custom-swipe-for-closing-sidebar/4504/3 "2016-12-17T08:16:24Z")

</div>

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.
