Doing easing in and out in blend is pretty straightforward.
Creating that same storyboard in C# is just a mater of syntax.
Setup the storyboard
Storyboard storyboard = new Storyboard();
var horizAnimation = new DoubleAnimationUsingKeyFrames();
Storyboard.SetTarget(horizAnimation, control);
Storyboard.SetTargetProperty(horizAnimation, new PropertyPath(Canvas.LeftProperty));
Defining keyframe(s)
// Setup the first Keyframe
SplineDoubleKeyFrame firstKeyFrame = new SplineDoubleKeyFrame();
firstKeyFrame.KeyTime = TimeSpan.FromSeconds((2));
firstKeyFrame.Value = 200;
// Setting the ease points from blend or XAML
firstKeyFrame.KeySpline.ControlPoint1 = new Point(0,0.0839999988675117);
firstKeyFrame.KeySpline.ControlPoint2 = new Point(0.76800000667572,1);
horizAnimation.KeyFrames.Add(firstKeyFrame);

The magic happens at line 8 and 9
The control points are the same points that you define in blend when defining easing on a animation.
X1 and Y1 are the coordinates for ControlPoint1.
X2 and Y2 are the coordinates for ControlPoint2.
The fastest way to get these coordinates is to copy them from the XAML code which includes your demo storyboard.




[...] Original Post [...]
[...] Kris Meeusen demonstrated how to create Storyboard animation identically using C# or XAML. A good article for you to reference how to create your first animation. [...]
You might appreciate an even easier syntax for animation in the code behind. Check out Artefact Animator - http://artefactanimator.codeplex.com/. It doesn’t use storyboards but it gives you a simple syntax that mimics Tweener for Flash. It also uses the same code for the Silverlight and WPF version.
looks great definitely going to give it a shot.