Associates an easing function with a DoubleAnimationUsingKeyFrames key-frame animation.
Inheritance
- Object
- DependencyObject
- DoubleKeyFrame
- EasingDoubleKeyFrame
Syntax
<EasingDoubleKeyFrame .../>
Attributes
- ActivatableAttribute(NTDDI_WIN8)
- MarshalingBehaviorAttribute(Agile)
- StaticAttribute(Windows.UI.Xaml.Media.Animation.IEasingDoubleKeyFrameStatics, NTDDI_WIN8)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The EasingDoubleKeyFrame class has these types of members:
Constructors
The EasingDoubleKeyFrame class has these constructors.
| Constructor | Description |
|---|---|
| EasingDoubleKeyFrame | Initializes a new instance of the EasingDoubleKeyFrame class. |
Methods
The EasingDoubleKeyFrame 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 EasingDoubleKeyFrame 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 DoubleKeyFrame) | |
| Read/write | Gets or sets the key frame's target value. (Inherited from DoubleKeyFrame) |
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 of a rectangle that contracts upward, slows down, then expands downward (as though falling), and then bounces to a stop.
<StackPanel x:Name="LayoutRoot" > <StackPanel.Resources> <Storyboard x:Name="myStoryboard"> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="myRectangle" EnableDependentAnimation="true"> <!-- This keyframe animates the ellipse up to the crest where it slows down and stops. --> <EasingDoubleKeyFrame Value="30" KeyTime="00:00:02"> <EasingDoubleKeyFrame.EasingFunction> <CubicEase EasingMode="EaseOut"/> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> <!-- This keyframe animates the ellipse back down and makes it bounce. --> <EasingDoubleKeyFrame Value="200" KeyTime="00:00:06"> <EasingDoubleKeyFrame.EasingFunction> <BounceEase Bounces="5" EasingMode="EaseOut"/> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> </Storyboard> </StackPanel.Resources> <Rectangle x:Name="myRectangle" PointerPressed="Pointer_Clicked" Fill="Blue" Width="200" Height="200" /> </StackPanel>
// When the user clicks the rectangle, 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
- DoubleKeyFrame
- EasingColorKeyFrame
- EasingPointKeyFrame
- KeyTime
- Value
Build date: 12/4/2012