An interface for animation.

Namespace: yWorks.Canvas.Animation
Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version:


public interface IAnimation
Visual Basic
Public Interface IAnimation


Instances of classes implementing this interface change their state according to a relative animation time. The animation time is a double between 0 for the start of the animation and 1 for the end of the animation.

  • An animated object is first created using the constructor of a subclass.
  • Immediately before the animation a client calls Initialize()()()().
  • To change the state of the animated object a client does a series of calls to Animate(Double), usually with an increasing relative time parameter.
  • If the animation is done, the client calls Cleanup()()()() once.
  • While Animate(Double) uses a relative time scheme, there might be an absolute time value for the preferred duration of the whole sequence of animation steps. Since an IAnimation instance has no control on the number of Animate(Double) calls or the intervals between them, the preferred duration is only a hint on how long the animation should take. Clients can ask for that hint using PreferredDuration and try to find a suitable sequence of Animate(Double) calls in order to fulfill the preference.

See Also