In XAML, you define animations in storyboards. You can also use storyboards in code, but they're rather messy and in most cases completely unnecessary. I mention this because many questioners (and even some answerers) in the MSDN WPF Forum seem to be unaware of the very powerful and very easy BeginAnimation method. You can't use BeginAnimation in XAML, but it's definitely the way to go when you're defining and triggering animations in code. The following WPF classes define a BeginAnimation method: Animatable UIElement ContentElement Visual3D These base classes account for quite a large chunk of WPF! You call BeginAnimation on the object that has the property you want to animate. The first argument to BeginAnimation is the fully-qualified named of the dependency property to animate. For example, suppose you have a Button named btn and you want to animate the FontSize property. You call: btn.BeginAnimation(Button.FontSizeProperty, ... Of course, the Button class inherits the FontSize property
Read More...