# Trigger Back Animation

**URL:** <https://forums.fusetools.com/t/trigger-back-animation/3383>\
**Category:** How-to Discussions\
**Created:** [April 22, 2015, 4:43pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383 "2015-04-22T16:43:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [April 22, 2015, 4:43pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/1 "2015-04-22T16:43:54Z")

</div>

I have a ManualTrigger that trigger a series of animations, when the ManualTrigger desactivate the animations run backwards. I put EasingBack=“CircularInOut” and DelayBack but when the trigger desactivate its dosnt work and run the same Animation when the Trigger Activates but backwards. DurationBack, DelayBack and EasingBack dont work in this ManualTrigger.

How can use the Backwards animation in ManualTriggers?

---

<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:** [April 23, 2015, 1:34pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/2 "2015-04-23T13:34:37Z")

</div>

I’m working on an example now, but if you have a particular snippet you’re working on that would be helpful.

---

<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:** [April 23, 2015, 1:43pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/3 "2015-04-23T13:43:38Z")

</div>

It appears that while `DurationBack` does work neither `DelayBack` nor `EasingBack` are working as intended (they don’t work when multiple animators are involved it seems). I’ll get that fixed and released soon.

---

<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:** [April 23, 2015, 2:06pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/4 "2015-04-23T14:06:23Z")

</div>

The short-term workaround is to ensure all the animators have one of `DurationBack` `DelayBack` or `EasingBack` specified. The code is such now that if one of them in a trigger does not have a back setting then no backward animation will be used.

The logic relates to how open-ended animators, like `Spin` work, but has this unintended side-effect of messing with progress based animators. I’m looking for a suitable solution.

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [April 23, 2015, 2:08pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/5 "2015-04-23T14:08:17Z")

</div>

Ok Then Should work but it’s a error of this version?

Because If I have this, works:

```auto

< Button ux:Name="MyButton">
< Tapped>
< Scale Target="MyButton" Factor="1.5" Duration="1" Easing="ElasticOut" DurationBack="10" EasingBack="CubicIn"/>
< /Tapped>

```

But if I have a ManualTrigger dont work, for example like this:

```auto

< ManualTrigger ux:Name="MyTrigger">
< Scale Target="MyButton" Factor="1.5" Duration="1" Easing="ElasticOut" DurationBack="10" EasingBack="CubicIn"/>
< /ManualTrigger>

```

In Uno file I Activate and Desactivate the trigger with a Pointer.Pressed. But the DurationBack, EasingBack dont work when I Desactivate the ManualTrigger. Its take the Values of initial animation in reverse.

---

<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:** [April 23, 2015, 2:12pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/6 "2015-04-23T14:12:18Z")

</div>

You are using only one animator, the `Scale` item, so it should now. I’ve tried this test and it works:

```auto
<Switch>
    <WhileToggled>
        <Change Target="StarTriggerA.On" Value="true"/>
    </WhileToggled>
</Switch>
<Star Width="50" Height="50">
    <SolidColor Color="0.5,0.5,0,1"/>
    <ManualTrigger ux:Name="StarTriggerA">
        <!--<Move X="200" Duration="2" DurationBack="0.2"/>-->
        <Scale Factor="1.5" Duration="1" Easing="ElasticOut" DurationBack="10" EasingBack="CubicIn"/>
    </ManualTrigger>
</Star>

```

Can I see the code you use to enable/disable the manualtrigger?

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [April 23, 2015, 3:46pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/7 "2015-04-23T15:46:56Z")

</div>

I know what was the problem! If I put in a trigger two animation one with DurationBack and EasingBack and the other no. When the trigger is Desactivate all the animation run backwards but the one that have Back Values dont respect them.

Here is an example that dont work the Back values.

```auto
<DockPanel Background="Green" Height="100" Width="100" HeightUnit="Percent" WidthUnit="Percent">
        <Switch>
            <WhileToggled>
                <Change Target="MyTrigger.On" Value="true"/>
            </WhileToggled>
        </Switch>
<Rectangle ux:Name="MyRectangle" Width="100" Height="100" Alignment="Bottom">
    <SolidColor Color="0,0,0,1"/>
</Rectangle>

<Rectangle ux:Name="MyRectangle2" Width="100" Height="100" Alignment="Top">
    <SolidColor Color="0,0,0,1"/>
</Rectangle>

<ManualTrigger ux:Name="MyTrigger">
        <Scale Factor="2" Target="MyRectangle" Duration="1" Easing="ElasticOut" />
        <Rotate Degrees="360" Target="MyRectangle2" Duration="1" Easing="ElasticOut" DurationBack="10" EasingBack="CubicIn"/>
</ManualTrigger>

</DockPanel>

```

If I put the same DurationBack to the both its works. Its posible to in the same trigger put diferrents DurationBacks in the animations?

---

<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:** [April 23, 2015, 3:53pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/8 "2015-04-23T15:53:17Z")

</div>

Yes, that’s what I meant about multiple animators. The Back settings aren’t working unless all of them have a back setting. It doesn’t matter which back setting, just each animator needs at least one. You can just set `DurationBack` to the same value as `Duration` as the quickest workaround.

I’m working on a proper fix, but for now that is the workaround.

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [April 23, 2015, 4:53pm UTC](https://forums.fusetools.com/t/trigger-back-animation/3383/9 "2015-04-23T16:53:38Z")

</div>

Thanks! 🙂
