ClassRadAnimation
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
RadAnimation()
Declaration
protected RadAnimation()
Properties
AnimationName
Gets or sets the name of the animation.
Declaration
public string AnimationName { get; set; }
Property Value
Remarks
This property is used by the NamedAnimationSelector to identify the correct animation to return.
It is not used outside the NamedAnimationSelector
RepeatBehavior
Gets or sets the value for the RepeatBehavior of the animation.
Declaration
public RepeatBehavior RepeatBehavior { get; set; }
Property Value
RepeatBehavior
SpeedRatio
Gets or sets the value for the SpeedRatio of the Storyboard generated by this animation.
Methods
CreateAnimation(FrameworkElement)
When overridden in a derived class this method is called when the animation for an instance of a control needs to be created.
Declaration
public abstract Storyboard CreateAnimation(FrameworkElement control)
Parameters
control
FrameworkElement
The control for which the animation is needed.
Returns
Storyboard
The newly created animation.
UpdateAnimation(FrameworkElement, Storyboard, params object[])
When overridden in a derived class this method updates the animation before it is played.
Declaration
public virtual void UpdateAnimation(FrameworkElement control, Storyboard storyboard, params object[] args)
Parameters
control
FrameworkElement
The control for which the animation needs to be updated.
storyboard
Storyboard
Storyboard that needs to be updated.
args
object[]
A set of arguments used for animation creation.
Remarks
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.