-
- cschedin_ewe
- Posts: 14
- Joined:
Problems with animated rendertransform after upgrade
Hi there!
I recently upgraded our Noesis version from 3.2.7 -> 3.2.13, and after the upgrade some of our animation storyboards stopped working.
When I try to animate (UIElement.RenderTransform).(ScaleTransform.ScaleX), nothing happens anymore.
I'm supplying some XAML code, it works in XAML Toy, and 3.2.7, but not after upgrading to 3.2.13 (The opacity animation works, but the scaling does not)
Have you seen this before or can you reproduce it locally?
Chris
I recently upgraded our Noesis version from 3.2.7 -> 3.2.13, and after the upgrade some of our animation storyboards stopped working.
When I try to animate (UIElement.RenderTransform).(ScaleTransform.ScaleX), nothing happens anymore.
I'm supplying some XAML code, it works in XAML Toy, and 3.2.7, but not after upgrading to 3.2.13 (The opacity animation works, but the scaling does not)
Code: Select all
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Center">
<Grid.Triggers>
<EventTrigger RoutedEvent="Grid.Loaded">
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever" Duration="0:0:1.0">
<DoubleAnimation Storyboard.TargetName="AnimEllipse"
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" From="2" To="0.5"
Duration="0:0:0.7" />
<DoubleAnimation Storyboard.TargetName="AnimEllipse"
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" From="2" To="0.5"
Duration="0:0:0.7" />
<DoubleAnimation Storyboard.TargetName="AnimEllipse" Storyboard.TargetProperty="Opacity" From="1" To="0"
Duration="0:0:0.7" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
<Ellipse x:Name="AnimEllipse" Width="100" Height="100" Stroke="Red" RenderTransformOrigin="0.5,0.5" />
</Grid>
</Grid>
Chris
-
- cschedin_ewe
- Posts: 14
- Joined:
Re: Problems with animated rendertransform after upgrade
Actually, I tried it with the packaged 3.2.13 version of XAMLPlayer, and it animates correctly there, so not really sure what's wrong with our integration. I'm not getting any errors it just doesn't animate. This applies to all RenderTransform animations
-
- cschedin_ewe
- Posts: 14
- Joined:
Re: Problems with animated rendertransform after upgrade
It's strange, when debugging it in visual studio I can see it correctly animates the value, but then it seems to never update the rendertransform, or something else is updating it after?
It does box the new value, but I can't really follow it from there.
It does box the new value, but I can't really follow it from there.
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Problems with animated rendertransform after upgrade
I guess it is just a typo, but you're trying to animate the ScaleTransform set in the RenderTransform property of AnimEllipse element, but that Ellipse doesn't have any RenderTransform assigned.
I've tried with the following xaml and it works fine in Noesis 3.2.13 XamlPlayer:
Could you confirm if this xaml still fails for you?
I've tried with the following xaml and it works fine in Noesis 3.2.13 XamlPlayer:
Code: Select all
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Center">
<Grid.Triggers>
<EventTrigger RoutedEvent="Grid.Loaded">
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever" Duration="0:0:1.0">
<DoubleAnimation Storyboard.TargetName="AnimEllipse"
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" From="2" To="0.5"
Duration="0:0:0.7" />
<DoubleAnimation Storyboard.TargetName="AnimEllipse"
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" From="2" To="0.5"
Duration="0:0:0.7" />
<DoubleAnimation Storyboard.TargetName="AnimEllipse" Storyboard.TargetProperty="Opacity" From="1" To="0"
Duration="0:0:0.7" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
<Ellipse x:Name="AnimEllipse" Width="100" Height="100" Stroke="Red" RenderTransformOrigin="0.5,0.5">
<Ellipse.RenderTransform>
<ScaleTransform/>
</Ellipse.RenderTransform>
</Ellipse>
</Grid>
</Grid>-
- cschedin_ewe
- Posts: 14
- Joined:
Re: Problems with animated rendertransform after upgrade
Oh, that does indeed work! Interesting. In the previous version this worked fine without defining the RenderTransform property. But this solves my issue, i'll just define the properties for our use cases with broken animations. Although if I may suggest, it should probably error if you are trying to animate an undefined rendertransform property?
Thanks regardless.
Thanks regardless.
Re: Problems with animated rendertransform after upgrade
Indeed, I see that this was working in previous versions, but it was a side effect of incorrect code that happened to be very lucky and do that instead of crashing. :)
We have never returned errors when the target animations don’t exist. I can revisit this behavior if you’d like, please create a ticket for it if needed.
Thank you!
We have never returned errors when the target animations don’t exist. I can revisit this behavior if you’d like, please create a ticket for it if needed.
Thank you!
Who is online
Users browsing this forum: No registered users and 6 guests