I didn't write here in quite some time, due to a hectic work schedule and a private Silverlight project taking all my time. It's going great and in the course of realizing it, I stumbled upon something I think I should post about: In the current version of Silverlight 1.1, creating animations in code by creating a new Storyboard and one or more new (for example) ColorAnimation(s) is not possible. In WPF, you can do this, but Silverlight doesn't have this ability yet. Thankfully, there is a workaround involving string manipulation and the XamlReader class.
In this example, we will create a ColorAnimation going from one random color to another random color in a random timespan. To keep it simple, we will simply create a new animation when the page is loaded. To see a different animation, you'll need to refresh the page using the F5 key in your web browser.
| posted on Saturday, November 24, 2007 5:46 AM