Silverlight 3 Quick Tip: Animation Easing and VSM
New version of VSM in Silverlight 3 got new interesting addition – ability to use Easing Function for visual state transition animation.
To use it, set the property “GeneratedEasingFunction” to desired VisuaStateTransition element and provide it with class instance with implements IEasingFunction.
To="ItemDeselected" x:Name="vtDeselected" >
<ElasticEase Oscillations="10" Springiness="2"/>
From Code Behind:
ElasticEase ease = new ElasticEase();
ease.EasingMode = EasingMode.EaseInOut;
ease.Oscillations = 15;
ease.Springiness = 1;
vtDeselected.GeneratedEasingFunction = ease;