# AddingAnimation on Grid elements does not work

**URL:** https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044
**Category:** Bug Reports
**Created:** [September 13, 2017, 8:23pm UTC](https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044 "2017-09-13T20:23:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![solomun.marko](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@solomun.marko](https://forums.fusetools.com/u/solomun.marko)
#### Post date: [September 13, 2017, 8:23pm UTC](https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044/1 "2017-09-13T20:23:11Z")

</div>

Hi,

I have found a problem with `AddingAnimation` to `StackPanel` where is `Grid` as a content.  
Grid is not showing up at all. Here is example:

```auto
<StackPanel>	
<Grid ux:Name="loginArea" Row="1" Padding="10,25" RowCount="2" Columns="auto,1*" Height="160" MaxWidth="400">
<Image Row="0" Column="0" File="Assets/login3.png" Width="20" Height="20" Margin="5,0,20,0" Alignment="Left"/>
<TextInput Row="0" Column="1" ux:Name="EmailLogin" PlaceholderText="Login Email" ActionStyle="Next" PlaceholderColor="#999" TextColor="#fff" CaretColor="#fff" Value="{LoginEmail}"/>
<Rectangle Row="0" Column="0" Alignment="Bottom" ColumnSpan="2" Height="1" Color="{logInBg}"/>
<Image Row="1" Column="0" File="Assets/login2.png" Width="20" Height="20" Margin="5,0,20,0" Alignment="Left"/>
<TextInput Row="1" Column="1" ux:Name="PasswordLogin" PlaceholderText="Login Password" PlaceholderColor="#999" TextColor="#fff" CaretColor="#fff" IsPassword="true" Value="{LoginPassword}"/>
<Rectangle Row="1" Column="0" Alignment="Bottom" ColumnSpan="2" Height="1" Color="{logInBg}"/>
</Grid>
<Scaling Factor="1.0" />
  <AddingAnimation>									 
     <Scale Factor="0.0" Duration="0.2" Easing="QuadraticInOut" />
     <Move RelativeTo="Size" Duration=".3" Y="0.7" />
  </AddingAnimation>
</StackPanel>

```

The thing is that animation does not start on Android preview. I have to lock device and unlock it to get grid elements visible, or just turn the phone to landscape mode.  
Elements starts showing up when I press on (invisible) text field.

PS: It works fine on PC preview.

Regards.

---

<div class="post-metadata">

### Author: ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)
#### Post date: [September 14, 2017, 10:05am UTC](https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044/2 "2017-09-14T10:05:08Z")

</div>

I believe the problem is outside of the code you’re showing. Please make a _complete_, minimal example that reproduces the issue.

Also, it’s not entirely clear exactly when do you expect the `AddingAnimation` to play. Yes, there is the `StackPanel` element, but when does it get instantiated?

I tried to make a minimal repro myself, but I don’t see any particular issues with it (except you probably shouldn’t be using a `Grid` here in the first place):

```auto
<App>
	<StackPanel>
		<Grid ux:Name="loginArea" Row="1" Padding="10,25" RowCount="2" Columns="auto,1*" Height="160" MaxWidth="400">
			<Panel Row="0" Column="0" Width="20" Height="20" Margin="5,0,20,0" Alignment="Left" Color="#18f" />
			<TextInput Row="0" Column="1" ux:Name="EmailLogin" PlaceholderText="Login Email" ActionStyle="Next" PlaceholderColor="#999" TextColor="#000" CaretColor="#000" Value="email" />
			<Rectangle Row="0" Column="0" Alignment="Bottom" ColumnSpan="2" Height="1" Color="#000" />
			<Panel Row="1" Column="0" Width="20" Height="20" Margin="5,0,20,0" Alignment="Left" Color="#f81" />
			<TextInput Row="1" Column="1" ux:Name="PasswordLogin" PlaceholderText="Login Password" PlaceholderColor="#999" TextColor="#000" CaretColor="#000" IsPassword="true" Value="password" />
			<Rectangle Row="1" Column="0" Alignment="Bottom" ColumnSpan="2" Height="1" Color="#aaa" />
		</Grid>
		<Scaling Factor="1.0" />
		<AddingAnimation>
			<Scale Factor="0.0" Duration="0.2" Easing="QuadraticInOut" />
			<Move RelativeTo="Size" Duration=".3" Y="0.7" />
		</AddingAnimation>
	</StackPanel>
</App>

```

---

<div class="post-metadata">

### Author: ![solomun.marko](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@solomun.marko](https://forums.fusetools.com/u/solomun.marko)
#### Post date: [September 14, 2017, 11:21am UTC](https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044/3 "2017-09-14T11:21:19Z")

</div>

Uldis thanks for reply.  
I am using ```  
  
// Stack panel

```auto

```

---

<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: [September 14, 2017, 11:34am UTC](https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044/4 "2017-09-14T11:34:34Z")

</div>

As a semi-random guess try `Factor="0.01"` on the `Scale` instead of 0.

---

<div class="post-metadata">

### Author: ![solomun.marko](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@solomun.marko](https://forums.fusetools.com/u/solomun.marko)
#### Post date: [September 14, 2017, 3:01pm UTC](https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044/5 "2017-09-14T15:01:00Z")

</div>

> **edA-qa mort-ora-y wrote:**
> 
> As a semi-random guess try `Factor="0.01"` on the `Scale` instead of 0.

@edA-qa mort-ora-y  
Thanks man, that actually worked! Good man!  
Regards.

---

<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: [September 14, 2017, 3:26pm UTC](https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044/6 "2017-09-14T15:26:25Z")

</div>

It’s an old issue that crops up in a few cases. If the element starts at 0 size, which it will in this case, there is nothing to scale from. I’ve linked the issue and we’ll hopefully get it fixed sometime (it’s a complicated fix).

---

<div class="post-metadata">

### Author: ![solomun.marko](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@solomun.marko](https://forums.fusetools.com/u/solomun.marko)
#### Post date: [September 14, 2017, 9:16pm UTC](https://forums.fusetools.com/t/addinganimation-on-grid-elements-does-not-work/3044/7 "2017-09-14T21:16:10Z")

</div>

It worked and that’s great. Factor of 0.01 is that small that you can not even see the element (in my case). Can you just force (in fix) 0.01 factor if 0.00 is used?
