Associates an easing function with a PointAnimationUsingKeyFrames key-frame animation.
Inheritance
- Object
- DependencyObject
- PointKeyFrame
- EasingPointKeyFrame
Syntax
<EasingPointKeyFrame .../>
Attributes
- ActivatableAttribute(NTDDI_WIN8)
- MarshalingBehaviorAttribute(Agile)
- StaticAttribute(Windows.UI.Xaml.Media.Animation.IEasingPointKeyFrameStatics, NTDDI_WIN8)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The EasingPointKeyFrame class has these types of members:
Constructors
The EasingPointKeyFrame class has these constructors.
| Constructor | Description |
|---|---|
| EasingPointKeyFrame | Initializes a new instance of the EasingPointKeyFrame class. |
Methods
The EasingPointKeyFrame class has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| ClearValue | Clears the local value of a dependency property. (Inherited from DependencyObject) |
| GetAnimationBaseValue | Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject) |
| GetValue | Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject) |
| 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) |
Properties
The EasingPointKeyFrame class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject) | |
| Read/write | Gets or sets the easing function that is applied to the key frame. | |
| Read-only | Identifies the EasingFunction dependency property. | |
| Read/write | Gets or sets the time at which the key frame's target Value should be reached. (Inherited from PointKeyFrame) | |
| Read/write | Gets or sets the key frame's target value. (Inherited from PointKeyFrame) |
Remarks
Easing functions allow you to apply custom mathematical formulas to your animations. Mathematical operations are often useful to produce animations that simulate real-world physics in a 2-D coordinate system. For example, you may want an object to realistically bounce or behave as though it were on a spring. For a list of easing functions and info on how to use them, see Key-frame animations and easing function animations.
Examples
This XAML example shows how to use key frames that have easing functions associated with them to create an animation that simulates an oval going up in the air and falling back down, where it bounces to a stop.
<Canvas Width="400" Height="300"> <Canvas.Resources> <Storyboard x:Name="myStoryboard"> <PointAnimationUsingKeyFrames Storyboard.TargetProperty="Center" Storyboard.TargetName="MyAnimatedEllipseGeometry" EnableDependentAnimation="True"> <!-- This keyframe animates the ellipse up to the crest where it slows down and stops. --> <EasingPointKeyFrame Value="50,20" KeyTime="00:00:02"> <EasingPointKeyFrame.EasingFunction> <CubicEase EasingMode="EaseOut"/> </EasingPointKeyFrame.EasingFunction> </EasingPointKeyFrame> <!-- This keyframe animates the ellipse back down and makes it bounce. --> <EasingPointKeyFrame Value="50,200" KeyTime="00:00:06"> <EasingPointKeyFrame.EasingFunction> <BounceEase Bounces="5" EasingMode="EaseOut"/> </EasingPointKeyFrame.EasingFunction> </EasingPointKeyFrame> </PointAnimationUsingKeyFrames> </Storyboard> </Canvas.Resources> <Path PointerPressed="Pointer_Clicked" Fill="Blue"> <Path.Data> <!-- Describes an ellipse. --> <EllipseGeometry x:Name="MyAnimatedEllipseGeometry" Center="50,200" RadiusX="15" RadiusY="15" /> </Path.Data> </Path> </Canvas>
// When the user clicks the ellipse, the animation // begins. private void Pointer_Clicked(object sender, PointerRoutedEventArgs e) { myStoryboard.Begin(); }
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
- Storyboarded animations
- Key-frame animations and easing function animations
- XAML animation sample
- PointKeyFrame
- EasingPointKeyFrame
- EasingDoubleKeyFrame
- KeyTime
- Value
Build date: 12/4/2012