Represents an easing function that retracts the motion of an animation slightly before it begins to animate in the path indicated.
Assembly: PresentationCore (in PresentationCore.dll)
Gets or sets the amplitude of retraction associated with aanimation.
Gets a value that indicates whether the object can be made unmodifiable. (Inherited from Freezable.)
Gets or sets a value that specifies how the animation interpolates. (Inherited from EasingFunctionBase.)
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.)
You can control when the "back up" behavior occurs in an animation by specifying the EasingMode property value on an animation. The following graph demonstrate the different values of EasingMode, where f(t) represents the animation progress and t represents time.
The formula used for this function is the following.
Because this animation causes values to retract before progressing, the animation might interpolate into negative numbers unexpectedly. This can cause errors when animating properties that do not allow negative numbers. For example, if you apply this animation to the Height of an object (e.g. from 0 to 200 with an EasingMode of EaseIn), the animation will attempt to interpolate through negative numbers for Height which will throw an error.
There are several other easing functions besideswhich you can explore using the following Silverlight sample.
In addition to using the easing functions included in the run-time, you can create your own custom easing functions by inheriting from EasingFunctionBase.
The following example applies a DoubleAnimation to create an animation that retracts slightly at the beginning and end of the animation.easing function to a
<Rectangle Name="MyRectangle" Margin="60" Width="50" Height="50" Fill="Blue"> <Rectangle.Triggers> <EventTrigger RoutedEvent="Rectangle.MouseDown"> <BeginStoryboard> <Storyboard> <DoubleAnimation From="1" To="2" Duration="00:00:1" Storyboard.TargetName="myScaleTransform" Storyboard.TargetProperty="ScaleX"> <DoubleAnimation.EasingFunction> <BackEase Amplitude="0.3" EasingMode="EaseInOut" /> </DoubleAnimation.EasingFunction> </DoubleAnimation> <DoubleAnimation From="1" To="2" Duration="00:00:1" Storyboard.TargetName="myScaleTransform" Storyboard.TargetProperty="ScaleY"> <DoubleAnimation.EasingFunction> <BackEase Amplitude="0.3" EasingMode="EaseInOut" /> </DoubleAnimation.EasingFunction> </DoubleAnimation> </Storyboard> </BeginStoryboard> </EventTrigger> </Rectangle.Triggers> <Rectangle.RenderTransform> <ScaleTransform x:Name="myScaleTransform" /> </Rectangle.RenderTransform> </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.