Compartir a través de


KeySpline (SplineDoubleKeyFrame)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the two control points that define animation progress for this key frame.

<object KeySpline="KeySpline"  .../>
value = object.KeySpline
object.KeySpline = value

Property Value

Type: KeySpline

The two control points that specify the cubic Bezier curve that defines the progress of the key frame.

This property is read/write. The default value is "0,0 1,1".

Managed Equivalent

KeySpline

Remarks

To specify a KeySpline, use the following string format: "cp1x,cp1y cp2x,cp2y". For more information, see the "Remarks" section in the KeySpline reference topic.

To understand how a KeySpline works, it is helpful to understand cubic Bezier curves. A cubic Bezier curve is defined by a start point, an end point, and two control points. The two coordinates in the KeySpline define the two control points. When describing key splines, the start point of the Bezier curve is always 0 and the end point is always 1, which is why you define only the two control points. The resulting curve specifies how an animation is interpolated during a time segment; that is, the curve represents the rate of change in the animation's target attribute over the time segment.

For more information on basic concepts, see Key-Frame Animations. Note that the Key-Frame Animations topic is written primarily for users of the managed API, and may not have code examples or specific information that address the JavaScript API scenarios.