Skip to content

Latest commit

 

History

History
47 lines (28 loc) · 3.4 KB

splinepointkeyframe.md

File metadata and controls

47 lines (28 loc) · 3.4 KB
-api-id -api-type
T:Windows.UI.Xaml.Media.Animation.SplinePointKeyFrame
winrt class

Windows.UI.Xaml.Media.Animation.SplinePointKeyFrame

-description

Animates from the Point value of the previous key frame to its own Value using splined interpolation.

-xaml-syntax

<SplinePointKeyFrame .../>

-remarks

Key-frame animations permit more than one target value that is reached at a point along the animation timeline. In other words each key frame can specify a different intermediate value, and the last key frame reached is the final animation value. By specifying multiple values to animate, you can make more complex animations. You can mix discrete, linear, and spline keyframes in the same keyframe collection.

For more info on how to use key-frame animations, see Key-frame animations and easing function animations.

-examples

This XAML example moves an ellipse along a triangular path. The example uses the PointAnimationUsingKeyFrames class to animate the Center property of an EllipseGeometry. This animation uses three key frames in the following manner:

  1. During the first half second, it uses an instance of the LinearPointKeyFrame class to move the ellipse along a path at a steady rate from its starting position. Linear key frames such as LinearPointKeyFrame create a smooth linear interpolation between values.
  2. During the end of the next half second, it uses an instance of the DiscretePointKeyFrame class to suddenly move the ellipse along the path to the next position. Discrete key frames like DiscretePointKeyFrame create sudden jumps between values.
  3. During the final two seconds, it uses an instance of the SplinePointKeyFrame class to move the ellipse back to its starting position. Spline key frames like SplinePointKeyFrame create a variable transition between values according to the values of the KeySpline property. In this example, the animation begins slowly and speeds up exponentially toward the end of the time segment.

[!code-xamlPointanimationusingkeyframes]

[!code-csharpPointanimationusingkeyframes_cs]

[!code-vbPointanimationusingkeyframes_cs]

-see-also

Storyboarded animations, Key-frame animations and easing function animations, PointKeyFrame, PointAnimationUsingKeyFrames, KeyTime, Value, KeyTime, Value