AddingAnimation on Grid elements does not work

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:

<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.

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):

<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>

Uldis thanks for reply.
I am using ```

// Stack panel

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

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.

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).

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?