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

Discrete Keyframes

A discrete keyframe indicates that no interpolation should be done from the previous keyframe. Updating DoubleAnimationUsingKeyFrames from Listing 19.1 as follows produces the motion illustrated in Figure 19.11:

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

Image

FIGURE 19.11 Discrete keyframes make the circle’s ...

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