O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Spline Keyframes

All three LinearXXXKeyFrame classes have a corresponding SplineXXXKeyFrame class. It can be used just like its linear counterpart, so updating DoubleAnimationUsingKeyFrames from Listing 19.1 as follows produces the same result:

<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Canvas.Top)"  Duration="0:0:3">  <Spline DoubleKeyFrame Value="0" KeyTime="0:0:0"/>  <Spline DoubleKeyFrame Value="200" KeyTime="0:0:1"/>  <Spline DoubleKeyFrame Value="0" KeyTime="0:0:2"/>  <Spline DoubleKeyFrame Value="200" KeyTime="0:0:3"/></DoubleAnimationUsingKeyFrames>

The spline keyframe classes have an additional KeySpline property that differentiates them from the linear classes. KeySpline can be set to an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required