Represents an easing function that creates an animated bouncing effect.
Assembly: PresentationCore (in PresentationCore.dll)
Gets or sets the number of bounces.
Gets or sets a value that specifies how bouncy the bounce animation is. Low values of this property result in bounces with little lose of height between bounces (more bouncy) while high values result in dampened bounces (less bouncy).
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.)
The following graph demonstrates EasingMode, where f(t) represents the animation progress and t represents time.using different values of
You can specify how many bounces occur using the Bounces property and specify how bouncy (how elastic the bounces are) using the Bounciness property. The Bounciness property specifies the amplitude scaling of the next bounce. For example, a bounciness value of 2 doubles the amplitude of the next bounce during an ease in, and it halves the amplitude of the next bounce during an ease out.
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 a bouncing effect.easing function to a
<Rectangle Name="myRectangle" Width="200" Height="30" Fill="Blue"> <Rectangle.Triggers> <EventTrigger RoutedEvent="Rectangle.MouseDown"> <BeginStoryboard> <Storyboard> <Storyboard x:Name="myStoryboard"> <DoubleAnimation From="30" To="200" Duration="00:00:3" Storyboard.TargetName="myRectangle" Storyboard.TargetProperty="Height"> <DoubleAnimation.EasingFunction> <BounceEase Bounces="2" EasingMode="EaseOut" Bounciness="2" /> </DoubleAnimation.EasingFunction> </DoubleAnimation> </Storyboard> </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.