Compartilhar via


IXRBackEase (Compact 2013)

3/28/2014

This class represents an easing function that retracts the motion of an animation slightly before or after the animation progresses in the path indicated.

Syntax

class IXRBackEase : public IXREasingFunctionBase

Inheritance Hierarchy

IXRDependencyObject

    IXREasingFunctionBase

        IXRBackEase

Methods

Method

Description

IXRBackEase::GetAmplitude

Retrieves the amplitude of retraction associated with an IXRBackEase animation.

IXRBackEase::SetAmplitude

Sets the amplitude of retraction associated with an IXRBackEase 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

IXRBackEase produces a winding-up effect when used at the beginning of an animation, and a winding-down effect when used at the end of an animation. For example, if you create an animation that expands the height of a rectangle from 50 pixels to 100 pixels and apply the IXRBackEase easing function to the beginning of the animation, the rectangle will initially shrink below 50 pixels before expanding to 100. How much the rectangle shrinks depends upon the amplitude of retraction.

You can control when the animation retracts 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

IXRBackEase

Gg158180.76738845-3f55-45bc-ba88-2e4a9902a9c4(en-us,WinEmbedded.80).jpg
Gg158180.03618911-bc09-4dfe-84ba-490d1f53d930(en-us,WinEmbedded.80).jpg
Gg158180.aa9e7466-74a6-40ea-9c79-dbb2969198eb(en-us,WinEmbedded.80).jpg

Note

Because this easing function causes values to retract outside of the range of values specified in the animation, this easing function might interpolate into negative numbers unexpectedly. Negative numbers can produce errors when animating certain properties. For example, if you apply this easing function to an animation that changes the Height of an object from 0 to 20 to 0 again, the easing function will attempt to interpolate through negative numbers for Height, which will cause an error.

When you create a class instance, use an IXRBackEasePtr 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 BackEase Class on MSDN.

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

Run the sample

.NET Framework Equivalent

System.Windows.Media.Animation.BackEase

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Animation Storyboards
IXREasingFunctionBase::SetEasingMode