A class that enables you to associate easing functions with a DoubleAnimationUsingKeyFrames key frame animation.
Assembly: PresentationCore (in PresentationCore.dll)
Initializes a new instance of theclass.
Initializes a new instance of the Double value.class with the specified
Initializes a new instance of the Double value and key time.class with the specified
|EasingDoubleKeyFrame(Double, KeyTime, IEasingFunction)|
Initializes a new instance of the Double value, key time, and easing function.class with the specified
Gets a value that indicates whether the object can be made unmodifiable. (Inherited from Freezable.)
Gets or sets the easing function applied to the key frame.
Gets a value that indicates whether the object is currently modifiable. (Inherited from Freezable.)
Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject.)
Gets or sets the key frame's target value. (Inherited from DoubleKeyFrame.)
This class is used as part of a DoubleKeyFrameCollection in conjunction with a DoubleAnimationUsingKeyFrames to animate a Double property value along a set of key frames. This DoubleKeyFrame interpolates between the Double value of the previous key frame and its own value linearly with an easing function to produce its output value.
The following example shows how to use key frames with 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.
<Rectangle Name="myRectangle" Width="200" Height="200" Fill="Blue"> <Rectangle.Triggers> <EventTrigger RoutedEvent="Rectangle.MouseDown"> <BeginStoryboard> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="myRectangle"> <!-- 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> </BeginStoryboard> </EventTrigger> </Rectangle.Triggers> </Rectangle>
Available since 4.0
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.