Compartir a través de


IXREasingPointKeyFrame (Compact 2013)

3/28/2014

This class defines a property that you can use to associate an easing function with an IXRPointAnimationUsingKeyFrames key-frame animation.

Syntax

class IXREasingPointKeyFrame : public IXRPointKeyFrame

Inheritance Hierarchy

IXRDependencyObject

    IXRPointKeyFrame

        IXREasingPointKeyFrame

Methods

Method

Description

IXREasingPointKeyFrame::GetEasingFunction

Retrieves the easing function that is applied to the key frame.

IXREasingPointKeyFrame::SetEasingFunction

Sets the easing function that is applied to the key frame.

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

To associate an easing function with an animation

  1. Use the IXRApplication::CreateObject(IID,Object) method to create an empty IXREasingPointKeyFrame object. Set the animation target values and the time values on the IXREasingPointKeyFrame object using the methods that are inherited from the IXRPointKeyFrame class.

  2. Use the IXRApplication::CreateObject(IID,Object) method to create an empty easing function object such as an instance of the IXRPowerEase class. Set the easing mode using the EasingMode function of your easing function object.

  3. Use IUnknown::QueryInterface on your easing function object to get a pointer to the IXREasingFunctionBase interface to pass to the IXREasingPointKeyFrame::SetEasingFunction method.

  4. Use the IXRPointAnimationUsingKeyFrames::GetKeyFrames method to obtain the collection of IXRPointKeyFrame objects in your animation.

  5. Use IUnknown::QueryInterface on your IXREasingPointKeyFrame object to get a pointer to the IXRPointKeyFrame interface. Pass the IXRPointKeyFrame pointer to the IXRPointKeyFrameCollection::Add or IXRPointKeyFrameCollection::Insert methods to add your new IXREasingPointKeyFrame object to the collection.

If you want to use a color key-frame animation or a point key-frame animation, associate the easing function with your animation using the IXREasingColorKeyFrame::SetEasingFunction or IXREasingPointKeyFrame::SetEasingFunction methods.

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

You can associate an easing function with 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 associate easing functions in the source XAML for your application, see the EasingPointKeyFrame Class on MSDN.

.NET Framework Equivalent

System.Windows.Media.Animation.EasingPointKeyFrame

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Animation Storyboards
IXRPointAnimationUsingKeyFrames