BounceEase class

Applies to Windows and Windows Phone

Represents an easing function that creates an animated bouncing effect.

Inheritance

Object
  DependencyObject
    EasingFunctionBase
      BounceEase

Syntax


public ref class BounceEase sealed : EasingFunctionBase


<BounceEase .../>

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The BounceEase class has these types of members:

Constructors

The BounceEase class has these constructors.

ConstructorDescription
BounceEase Initializes a new instance of the BounceEase class.

 

Methods

The BounceEase class has these methods. It also inherits methods from the Object class.

MethodDescription
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
Ease Transforms normalized time to control the pace of an animation. (Inherited from EasingFunctionBase)
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 BounceEase class has these properties.

PropertyAccess typeDescription

Bounces

Read/writeGets or sets the number of bounces.

BouncesProperty

Read-onlyIdentifies the Bounces dependency property.

Bounciness

Read/writeGets or sets a value that specifies how bouncy the bounce animation is. Low values of this property result in bounces with little loss of height between bounces (more bouncy) while high values result in dampened bounces (less bouncy).

BouncinessProperty

Read-onlyIdentifies the Bounciness dependency property.

Dispatcher

Read-onlyGets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)

EasingMode

Read/writeGets or sets a value that specifies how the animation interpolates. (Inherited from EasingFunctionBase)

 

Remarks

BounceEase has two controlling properties Bounciness and Bounces that affect the behavior of the function.

ElasticEase is a similar easing function that works well for physics emulation in animations. The difference with BounceEase is that an ElasticEase can go outside the From/To range. Another way to conceptualize the two easing functions is that ElasticEase is what you might use to animate the plucking of a string, whereas BounceEase is what you might use to show the bounce of a ball against a line or plane.

An easing function can be applied to the EasingFunction properties of From/To/By animations, or to the EasingFunction properties of key-frame types used for the Easing variants of key-frame animations. For more info, see Key-frame animations and easing function animations.

Examples

The following example applies a BounceEase easing function to a DoubleAnimation to create a bouncing effect.


<StackPanel x:Name="LayoutRoot" >
    <StackPanel.Resources>
        <Storyboard x:Name="myStoryboard">
            <DoubleAnimation From="1" To="6" Duration="00:00:3" 
                Storyboard.TargetName="rectScaleTransform" 
                Storyboard.TargetProperty="ScaleY">
                <DoubleAnimation.EasingFunction>
                    <BounceEase Bounces="2" EasingMode="EaseOut" 
                                Bounciness="2" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </StackPanel.Resources>

    <Rectangle PointerPressed="Pointer_Clicked" 
     Fill="Blue" Width="200" Height="30">
        <Rectangle.RenderTransform>
            <ScaleTransform x:Name="rectScaleTransform" />
        </Rectangle.RenderTransform>
    </Rectangle>

</StackPanel>


No code example is currently available or this language may not be supported.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media.Animation
Windows::UI::Xaml::Media::Animation [C++]

Metadata

Windows.winmd

See also

Storyboarded animations
Key-frame animations and easing function animations
EasingFunctionBase
PowerEase
BackEase
CircleEase
CubicEase
ElasticEase
ExponentialEase
QuadraticEase
QuarticEase
QuinticEase
SineEase

 

 

Show:
© 2014 Microsoft