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 ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.