Published articles on other web sites*

Published articles on other web sites*

WPF vs. Silverlight - Part 4 - Animations

If you want to work with animations programmatically, and modify them as they run, WPF requires you to start and stop the animation with a few extra parameters, to prevent them from being "frozen". Silverlight doesn't freeze elements, so this is not necessary there.
#if SILVERLIGHT
myStoryboard.Begin();
myStoryboard.Stop();
#else
myStoryboard.Begin(element, true); //true allows for changing animation later
myStoryboard.Stop(element); //element parameter required when Begin was called with element
#endif

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...