# Trigger animation on Visible change?

**URL:** <https://forums.fusetools.com/t/trigger-animation-on-visible-change/2763>\
**Category:** How-to Discussions\
**Created:** [December 9, 2015, 9:10pm UTC](https://forums.fusetools.com/t/trigger-animation-on-visible-change/2763 "2015-12-09T21:10:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando\_Lins](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/fernando_lins/32/597_2.png) [@Fernando\_Lins](https://forums.fusetools.com/u/Fernando_Lins)\
**Post date:** [December 9, 2015, 9:10pm UTC](https://forums.fusetools.com/t/trigger-animation-on-visible-change/2763/1 "2015-12-09T21:10:57Z")

</div>

Hello, [First of all thank you so much for Fuse, what an AWESOME tool!]

I’m working on a simple UI that has a button and when tapped it should bring up an alert. I am using Change Visibility to hide/show the alert. How do I write a trigger that will animate on the Visibility changes?

Also: How can I align the top of an element to the bottom of the screen so that it is outside the visible screen area?

Thank you!

---

<div class="post-metadata">

**Author:** ![Fernando\_Lins](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/fernando_lins/32/597_2.png) [@Fernando\_Lins](https://forums.fusetools.com/u/Fernando_Lins)\
**Post date:** [December 10, 2015, 3:40am UTC](https://forums.fusetools.com/t/trigger-animation-on-visible-change/2763/2 "2015-12-10T03:40:14Z")

</div>

I fixed the issue with of displaying the alert by using “Collapsed” instead of Hidden 🙂

---

<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 10, 2015, 6:10am UTC](https://forums.fusetools.com/t/trigger-animation-on-visible-change/2763/3 "2015-12-10T06:10:05Z")

</div>

We don’t have a direct way of responding to the visibility changes at the moment. There is a `WhileVisible` trigger but I’m not sure this can do what you want. You can instead use a `WhileTrue` trigger and `Pulse` it.

```auto
<WhileTrue ux:Name="GrowMe">
   <Scale Factor="2" Duration="0.3"/>
</WhileTrue>

```

```auto
<Clicked>
   <Set AlertPanel.Visibility="Visibile"/>
   <Pulse Target="GrowMe"/>
</Clicked>

```

For the alignment question you can use the `Anchor` property to modify how `Alignment` is applied:

```auto
<Panel Aligment="BottomCenter" Anchor="50%,0%">

```

The `Anchor` says what point in this panel is being aligned, in this case the middle of the top edge. The `Alignment` will then align this point to the `BottomCenter` of the parent panel.

---

<div class="post-metadata">

**Author:** ![Fernando\_Lins](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/fernando_lins/32/597_2.png) [@Fernando\_Lins](https://forums.fusetools.com/u/Fernando_Lins)\
**Post date:** [December 10, 2015, 4:02pm UTC](https://forums.fusetools.com/t/trigger-animation-on-visible-change/2763/4 "2015-12-10T16:02:59Z")

</div>

Thank you very much for the reply 😃

---

<div class="post-metadata">

**Author:** ![Leandro\_Sehnem\_Borto](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/leandro_sehnem_borto/32/87_2.png) [@Leandro\_Sehnem\_Borto](https://forums.fusetools.com/u/Leandro_Sehnem_Borto)\
**Post date:** [May 19, 2017, 2:03am UTC](https://forums.fusetools.com/t/trigger-animation-on-visible-change/2763/5 "2017-05-19T02:03:04Z")

</div>

Hi Fernando.

I’m trying to do this too. Can you share your “Alert Message” source code, please?

Thanks
