Compartir a través de


IXRBounceEase (Compact 2013)

3/28/2014

This class represents an easing function that creates an animated bouncing effect.

Syntax

class IXRBounceEase : public IXREasingFunctionBase

Inheritance Hierarchy

IXRDependencyObject

    IXREasingFunctionBase

        IXRBounceEase

Methods

Method

Description

IXRBounceEase::GetBounces

Retrieves the number of bounces.

IXRBounceEase::GetBounciness

Retrieves a value that specifies how elastic the bounce animation is.

IXRBounceEase::SetBounces

Sets the number of bounces.

IXRBounceEase::SetBounciness

Sets a value that specifies how elastic 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). A value of 1 results in bounces that are almost the same height as the full animation.

Thread Safety

Members of this class are thread safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

You can control when the animation bounces by passing one of the XREasingMode enumerated values to the inherited IXREasingFunctionBase::SetEasingMode method. The following graph demonstrates the different values of the easing mode, where f(t) represents the animation progress and t represents time.

Easing function

XREasingMode_EaseIn

XREasingMode_EaseOut

XREasingMode_EaseInOut

IXRBounceEase

Gg159015.98b448bc-3ecf-4495-a48d-c4e7af1c48ac(en-us,WinEmbedded.80).jpg
Gg159015.12480f85-efb9-47e3-b78c-28ad77a84fff(en-us,WinEmbedded.80).jpg
Gg159015.4affeecb-f363-4317-96e4-b7e70f829c39(en-us,WinEmbedded.80).jpg

You can specify how many bounces occur using the IXRBounceEase::SetBounces method and specify how elastic the bounces are using the IXRBounceEase::SetBounciness method.

When you create a class instance, use an IXRBounceEasePtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can apply this easing function to an animation in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the BounceEase Class on MSDN.

There are several other easing functions besides IXRBounceEase, which you can explore using the following sample:

Run the sample

.NET Framework Equivalent

System.Windows.Media.Animation.BounceEase

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Animation Storyboards
IXREasingFunctionBase::SetEasingMode