The Tween type exposes the following members.

Constructors

  NameDescription
Tween
Constructor initializes a new Tween. Each Tween can contains lot of sequences or TweenObjects via AddSequences method.
 Copy Code
            Tween myTween = new Tween();
            //or with inference
            var myTween = new Tween();
                    

Methods

  NameDescription
AddSequences
This mehod add a new animation sequence at Tween.
 Copy Code
            //Consider we want to add 3 Tween objects : to1, to2, to3
            myTween.AddSequences( to1 );
            myTween.AddSequences( to2 );
            myTween.AddSequences( to3 );
            //A more compact syntaxt would be :
            myTween.AddSequences( to1, to2, to3  );
                    
ClearSequences
This mehod Delete all animations sequences contained by the Tween.
 Copy Code
             myTween.Clear();   
                    
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
GetHashCode (Inherited from Object.)
GetType (Inherited from Object.)
MemberwiseClone (Inherited from Object.)
Pause
Pause or Resume current animation. ActualState becomes TweenedState.Paused or TweenedState.RPaused or TweenedState.Reversing or TweenedState.Tweening.
 Copy Code
            myTween.Pause();      
                    
RemoveSequences
This mehod Delete an animation sequence Tween
 Copy Code
            //Consider we have 3 Tween objects : to1, to2, to3 and we want delete 2 of them
            myTween.RemoveSequence( to2 );
            myTween.RemoveSequence( to3 );
            //A more compact syntaxt would be :
            myTween.RemoveSequence(  to2, to3  );
                    
Reverse
Plays the animation back. ActualState becomes TweenedState.Reversing.
 Copy Code
            myTween.Reverse();    
                    
Start
This mehod Plays the animation. ActualState becomes TweenedState.Tweening.
 Copy Code
             myTween.Start();   
                    
Stop
Stop animation and animation back if needed. ActualState becomes TweenedState.Stopped.
 Copy Code
            myTween.Stop();      
                    
ToString (Inherited from Object.)

Properties

  NameDescription
ActualState
Indicates the current state of animation Tween - ReadOnly
AutoReverse
Allows you to automatically manage the autoReverse Tween.
BeginTime
BeginTime can shift the start of animation based on a number of seconds Example: myTween.BeginTime = = TimeSpan.FromSeconds (2); Can shift the start of the animation 2 seconds
Count
Indicates the number of animation sequences (tweenObject) currently administered by the Tween - ReadOnly
FreeReference
FreeReference has been made to contains the reference of your choice. This allows you more flexible design code. This Field is received when listening the TweenCompleted event or the ReverseCompleted event.
ReverseSpeedRatio
Can manage the speed of Reverse Tween. The default is 1.
TweenSpeedRatio
Can manage the speed of Tween. The default is 1. La valeur 0.5 multipliera la dure de l'animation par 2

Events

  NameDescription
ReverseCompleted
Event triggered when the animation back Tween is complete. for use with the AutoReverse or method Reverse
 Copy Code
            void Page_Loaded(object sender, RoutedEventArgs e)
            {
                myTween.TweenCompleted += new Tween.StoryboardComplete(myTween_TweenCompleted);
                
                //myTween.FreeReference is typed with object, you set what ever you want.
                myTween.FreeReference = "Hello the animation BACK is finished.";
            }
            
            void myTween_TweenCompleted(Tween sender, object freeReference )
            {
                Debug.WriteLine("that tween {0} is over with that freeParameter :: {1}.", sender, freeReference);
            }
                    
TweenCompleted
Event triggered when the animation Tween is complete.
 Copy Code
            void Page_Loaded(object sender, RoutedEventArgs e)
            {
                myTween.TweenCompleted += new Tween.StoryboardComplete(myTween_TweenCompleted);
                
                //myTween.FreeReference is typed with object, you set what ever you want.
                myTween.FreeReference = "Hello the animation is finished.";
            }
            
            void myTween_TweenCompleted(Tween sender, object freeReference)
            {
                Debug.WriteLine("that tween {0} is over with that freeParameter :: {1}.", sender, freeReference);
            }
                    

See Also