IXREasingFunctionBase (Compact 2013)

3/28/2014

This class provides the base class for all easing functions.

Syntax

class IXREasingFunctionBase : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

    IXREasingFunctionBase

        IXRBackEase

        IXRBounceEase

        IXRCircleEase

        IXRCubicEase

        IXRElasticEase

        IXRExponentialEase

        IXRPowerEase

        IXRQuadraticEase

        IXRQuinticEase

        IXRQuarticEase

        IXRSineEase

Methods

Method

Description

IXREasingFunctionBase::Ease

Transforms normalized time to control the interpolation of an animation.

IXREasingFunctionBase::GetEasingMode

Retrieves the easing mode of the current animation.

IXREasingFunctionBase::SetEasingMode

Sets the easing mode of the current 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

An easing function defines how an animation sequence progresses. The easing function calculates the rate of interpolation over the duration of the animation, determining the rate of change in the animation's target value.

For example, a linear interpolation looks like a straight line. In a linear interpolation, the change in the animation's target value would progress smoothly, with no fluctuations in velocity. A nonlinear interpolation looks like a curved line, where the velocity of the change in the animation's target value speeds up at the steeper areas of the curve and slows down at the flatter areas of the curve. For illustrations of the effects of different easing functions, see XREasingMode.

The animation associated with the easing function can be a storyboard or a segment between key frames. You can obtain a pointer to the easing function that an animation is using by calling the GetEasingFunction method of animation classes such as IXRDoubleAnimation, IXRColorAnimation, IXRPointAnimation, IXREasingDoubleKeyFrame, IXREasingColorKeyFrame, and IXREasingPointKeyFrame. You then have the option to change the easing mode to specify which part of the animation sequence to apply the easing function to: the beginning, the end, or both.

To set an easing function for an animation, create an instance of one of the easing functions that derive from IXREasingFunctionBase (such as IXRPowerEase) and then use the SetEasingFunction method of the animation object (such as IXRDoubleAnimation or IXREasingDoubleKeyFrame).

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

Note

Custom easing functions are not supported in XAML for Windows Embedded.

.NET Framework Equivalent

System.Windows.Media.Animation.EasingFunctionBase

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Animation Storyboards
XREasingMode
IXRVisualTransition::SetGeneratedEasingFunction
IXRVisualTransition::GetGeneratedEasingFunction
IXRDoubleAnimation::GetEasingFunction
IXRColorAnimation::GetEasingFunction
IXRPointAnimation::GetEasingFunction
IXREasingDoubleKeyFrame::GetEasingFunction
IXREasingColorKeyFrame::GetEasingFunction