Steps needed to be performed in order to create an animation in XAML - Silverlight

Explain the steps needed to be performed in order to create an animation in XAML

Animation is performed by using Storyboard.TargetName property. For example, to animate an object, the following are the steps:

- Write <BeginStoryboard> tag.
- Embed <Storyboard> tag
- Write <DoubleAnimationUsingKeyFrames> along with begin time and Storyboard.TargetName, Storyboard.TargetProperty attributes.
- Use <SplineDoubleKeyFrame> tag along with KeyTime and value attributes
- Close all the corresponding tags.

The following is the snippet of XAML file to animate an object
<BeginStoryboard>
    <Storyboard>
       <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
           Storyboard.TargetName="border"            Storyboard.TargetProperty="(Border.Background).
          (GradientBrush.GradientStops)[0].(GradientStop.Offset)">
       <SplineDoubleKeyFrame KeyTime="00:00:0" Value="0"/>
     <SplineDoubleKeyFrame KeyTime="00:00:1" Value="1"/>
    </DoubleAnimationUsingKeyFrames>
   </Storyboard>
</BeginStoryboard>
What are the animation types supported by Silverlight?
Animation types supported by Silverlight - Silverlight supports 2 types of animations:...
Concept of KeyFrame - Silverlight
The value of the target property is animated by a key-frame animation. A transition among its target values over its duration is created...
Explain how to control animation from JavaScript code - Silverlight
The animation is controlled by starting the execution of Begin() on the Storyboard. For example let us name the Storyboard as “animation”...
Post your comment