Charles Petzold

My Article on Animation Extensions in MSDN Magazine

June 19, 2007
Roscoe, N.Y.

The July 2007 issue of MSDN Magazine has gone online. If you're into WPF graphics programming, don't miss my article on extending the animation classes.

The article includes downloadable code, of course, but for your convenience I've converted two of the demo programs to XBAPs, which you can run from here.

My primary example in the article consists of new classes that animate objects of type PointCollection. The animations interpolate between corresponding members of two PointCollection objects, allowing vector morphing effects. As a simple application, I wrote a XAML template for a CheckBox that morphs between the words "No" and "Yes":


If you were coding for Windows prior to the first Bush administration, you might recognize this as the old polyline Script font. I always knew it was good for something!

My article also showed an example of animating Point3DCollection objects, but rather than interpolation, I took a different approach. I created an animation class into which you can hook a class that performs arbitrary algorithmic transforms. I then applied a "twister" transform to the classic Utah teapot: