RadAnimation
Represents an abstract base class for creating animations in a user interface.
The RadAnimation class provides properties to define the name, repeat behavior,
and speed ratio of an animation, along with methods to create and update animations for
UI controls. Derived classes should implement the CreateAnimation method to
generate specific animations, while the UpdateAnimation method can be overridden
to adjust the timing and behavior of the storyboard before playback. This class serves as
the foundation for animation management in UI applications, allowing for flexible and
reusable animation logic.
Definition
Namespace:Telerik.Windows.Controls.Animation
Assembly:Telerik.Windows.Controls.dll
Syntax:
public abstract class RadAnimation
Inheritance: objectRadAnimation
Derived Classes:
Constructors
protected RadAnimation()
Properties
Gets or sets the name of the animation.
public string AnimationName { get; set; }
This property is used by the NamedAnimationSelector to identify the correct animation to return.
It is not used outside the NamedAnimationSelector
Gets or sets a value indicating whether the animation should automatically reverse its direction upon completion.
public bool AutoReverse { get; set; }
RepeatBehavior
RepeatBehavior
Gets or sets the value for the RepeatBehavior of the animation.
public RepeatBehavior RepeatBehavior { get; set; }
Gets or sets the value for the SpeedRatio of the Storyboard generated by this animation.
public double SpeedRatio { get; set; }
Methods
CreateAnimation(FrameworkElement)
Storyboard
When overridden in a derived class this method is called when the animation for an instance of a control needs to be created.
public abstract Storyboard CreateAnimation(FrameworkElement control)
The control for which the animation is needed.
Returns:Storyboard
The newly created animation.
When overridden in a derived class this method updates the animation before it is played.
public virtual void UpdateAnimation(FrameworkElement control, Storyboard storyboard, params object[] args)
The control for which the animation needs to be updated.
storyboardStoryboardStoryboard that needs to be updated.
argsobject[]A set of arguments used for animation creation.
Currently the method sets the SpeedRatio of the storyboard to the global AnimationSpeedRatio if the local SpeedRatio is null. If the local SpeedRatio value is set, it will be used.