In this article we will be seeing how to create Silverlight ScaleTransform Animation using Visual studio 2010.
In this article we will be applying ScaleTransform to an object based on one of the properties of the transform animation. Scale Transform will be applied to Rectangle object and the ScaleY property of the scale transform will be animated. For ScaleTransform check http://www.c-sharpcorner.com/UploadFile/anavijai/4493/.
Adding ScaleTransform:
<Rectangle x:Name="rectangle" Height="50" Width="50" Canvas.Left="75" Canvas.Top="75" Fill="Blue">
<Rectangle.RenderTransform>
<ScaleTransform x:Name="scaleTransform"></ScaleTransform>
</Rectangle.RenderTransform>
</Rectangle>
Adding StoryBoard:
<Storyboard x:Name="storyBoard">
<DoubleAnimation Storyboard.TargetName="scaleTransform"
Storyboard.TargetProperty="ScaleY"
From="1"
To="2"
Duration="0:0:3"
RepeatBehavior="Forever"
AutoReverse="True">
</DoubleAnimation>
</Storyboard>
Begin the Animation:
storyBoard.Begin();
Steps Involved:
Creating a Silverlight Application:


Join the conversation! Your thoughts help the community grow.