In this tutorial Kirupa Chinnathambi demonstrates how to create animations in code.
In Silverlight and WPF, there are several ways you can create animations. One way that has been covered before on this site involves creating a storyboard and using Expression Blend to visually create your animation. This approach is great for majority of all animations you would ever want to create. There are exceptions where this solution doesn't work as well as you would like.