Tweened Library for Silverlight 2 is released
8 commentaires
I put online Version 2 of Tweened. Tweened is an open-source CSharp 3 Animations generation library more oftenly called Tweens. Tweened is licensed under GNU General Public Licence v3.
![]() |
The main purpose of this project is to provide a very simple way to animate any Xaml Objects you want in Silverlight 2. To reach this goal you just have to Reference Tweened.dll in a Silverlight 2 project. You will have access to color, RenderTransform and simple propertie Animation easily with many options like AutoReverse , BeginTime , SpeedRatio,etc...
It's released and maintained for Silverlight 2 or higher. In layman's terms, Tweened helps you move things around on the screen using only code, instead of the timeline. The general idea of a tweening Class is that dynamic animation and transitions (created by code) are easier to maintain and control, and more stable than animation based on the regular Silverlight timeline. The Tweened syntax is created with simplicity of use in mind, while still allowing access to more advanced features. the general idea is to make doable the automatic creation of Storyboards resources type. Internally class Tween operates two Storyboards, the first is used for animation to go, the other is used if necessary to animation back. Storyboards Each of these contains a number of objects DoubleAnimation XAML. They serve as animated sequences. Each DoubleAnimation refers to an Xaml object and a lively targeted property, for example X or ScaleX. So a tween can animate lot of objects in several different equation of movement with different duration and behavior. For example a double animation could loop. URL :: http://library.tweened.org/ |





Hi,
great job, its about time for a nice working tweening class for silverlight!
i am tring to implement your tweener and found out few difficulties,
i have a sample code that shows the bugs, it is currently present at http://www.codemcode.com/sltween/movableXap.rar
it acts strange when you try to move few objects to different positions, just play with it for a minute, and you’ll see my point.
waiting for your reply,
Ady.
Hi Ady,
I send you an email today about that
So ok I understood the problem. In fact there are of two kind :
1 – the first concern that in the Try { }
you have to put that code :
t2t.ContinueTo(moveLocation);
//tweenObjects[mc].AddSequences(t2t); that line was wrong I think
tweenObjects[mc].Start();
2 – the second point is known behavior of Silverlight player (i think). in fact when a storyboard targets a renderTransform property, it is just impossible to get the actual value of that property. I don’t know exactly why… The solution consists in using TweenableProperties.Left instead of X. So you will have access to updated value for that kind of properties. I send you the project updated now.
Thanks for your response,
it works like charm now
i will defo use this class alot !
keep on the good work!
ady.
Is the best tweener that I have found for Silverlight 2.
I have modified source and put a method to remove Resources, because Tween don’t work on a loop function that will be instanciated:
public void CloseTween()
{
Application.Current.Resources.Remove(StoryBoardNameOut);
Application.Current.Resources.Remove(StoryBoardNameIn);
}
Hi Francisco thanks it’s cool to see that some one in the world is using Tweened. I will release a new version of it for Silverlight 3, a kind of wrapper
I will modify the Tweened library in that direction and let developer to say if they want storyboards to be referenced in Resources property or not. After all we can avoid to add them to resources
Hey, I came across this post while searching for help with fixing Microsoft Silverlight. I’ve recently switched browsers from Chrome to Microsoft Internet Explorer 5. After the change I seem to have a problem with loading websites that use Microsoft Silverlight. Everytime I go on a page that requires Microsoft Silverlight, my computer doesn’t load and I get a “npctrl.dll” error. I can’t seem to find out how to fix it. Any help getting Microsoft Silverlight to work is very appreciated! Thanks