KeySpline Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
This class is used by a spline key frame to define animation progress.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
The KeySpline type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ControlPoint1 | Gets or sets the first control point used to define a Bezier curve that describes a KeySpline. |
![]() | ControlPoint2 | Gets or sets the second control point used to define a Bezier curve that describes a KeySpline. |
![]() | Dispatcher | Gets the Dispatcher this object is associated with. (Inherited from DependencyObject.) |
| Name | Description | |
|---|---|---|
![]() | CheckAccess | Determines whether the calling thread has access to this object. (Inherited from DependencyObject.) |
![]() | ClearValue | Clears the local value of a dependency property. (Inherited from DependencyObject.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetAnimationBaseValue | Returns any base value established for a Windows Phone dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetValue | Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ReadLocalValue | Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.) |
![]() | SetValue | Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
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 defines 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.
XAML object element syntax for KeySpline (to fill a KeySpline property in property element syntax) is possible but not common. It is more common to use attribute syntax on a KeySpline property and use the type conversion behavior to specify both ControlPoint1 and ControlPoint2 in a single string.
XAML Usage Notes
The two control points may also be delimited by a single comma and/or one or more spaces.
controlPoint1 and controlPoint2 are "logical points", not points in an actual onscreen coordinate system. See "Logical Points" section in Point.
The common usage is to use a comma between x,y of a point, and a space between points, for example 0,0 0.5,1.


