15 Apr, 2009
Silverlight 3 : Création d’animations easing avec code C#
Posted by: Guillaume Andre In: Silverlight
En complément du post Silverlight 3 animations easing voici comment réaliser des animations Silverlight 3 entièrement côté code behind.
Le code ci-dessous permet d’animer la propriété “Canvas.Left” d’une Ellipse. Le but est uniquement d’apprendre à appliquer un effet de easing à une animation avec C#.
Création du Storyboard
Storyboard sb = new Storyboard();
Storyboard.SetTargetName(sb, "monEllipse");
Storyboard.SetTargetProperty(sb, new PropertyPath("(Canvas.Left)"));
Un Storyboard peut [...]