共用方式為


SplineColorKeyFrame.KeySpline Property

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.

Namespace:  System.Windows.Media.Animation
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Property KeySpline As KeySpline
public KeySpline KeySpline { get; set; }
<SplineColorKeyFrame KeySpline="keySplineValue"/>

XAML Values

  • keySplineValue
    A string that defines the two logical x,y point pairs of a key spline. For more information, see KeySpline.

Property Value

Type: System.Windows.Media.Animation.KeySpline
The two control points that specify the cubic Bezier curve which defines the progress of the key frame.

Remarks

Dependency property identifier field: KeySplineProperty

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

Run the sample below to see how changing the KeySpline value effects the interpolation of the animation. Also, this sample demonstrates the effect of the KeySpline on the Bezier curve which represents the interpolation.

Run this sample

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.