Introduction
In Silverlight, we create animations to compete 'adobe flash' but till
now we have not created any such project which assumes something like this, we
just saw how to transform an element by using static compositions. As we saw
multiple types of transformations, we'll see multiple types of animations too
in my coming posts. Here you will see 'DoubleAnimation' and we have also
another one that is 'DoubleAnimationUsingKeyFrames' (will discuss it later). Here
you'll go with only 'DoubleAnimation'.
Look at the XAML Code below:
XAML Code
Please refer previous part for better understanding.
In above code, I have not strike <TransformGroup>
root because inside this I'm using <ScaleTransform> and
<RotateTransform>. Remember previous parts where we have strike
<GroupTransform> because we have single transform there but now we have
multiple here.
<ScaleTransform> has name 'Action1' and it has now
two scale property that is 'ScaleX' and 'ScaleY'. Similarly we have used 'ScaleX'
and 'ScaleY' in <DoubleAnimation>.
<RotateTransform> has name 'Action2' and it has
'Angle' so we have used 'Storyboard.TargetName to 'Action2' and
'Storyboard.TargetProperty' to 'Angle' in <DoubleAnimation>. In
<DoubleAnimation> we have also used 'To' property to 360 degree.
HAVE A HAPPY CODING!!