Compartilhar via


IXREasingColorKeyFrame (Compact 2013)

3/28/2014

You can use this class to define a property that associates an easing function with an IXRColorAnimationUsingKeyFrames key-frame animation.

Syntax

class IXREasingColorKeyFrame : public IXRColorKeyFrame

Inheritance Hierarchy

IXRDependencyObject

    IXRColorKeyFrame

        IXREasingColorKeyFrame

Methods

Method

Description

IXREasingColorKeyFrame::GetEasingFunction

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

IXREasingColorKeyFrame::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 IXREasingColorKeyFrame object. Set the animation target values and the time values on the IXREasingColorKeyFrame object using the methods that are inherited from the IXRColorKeyFrame 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 IXREasingColorKeyFrame::SetEasingFunction method.

  4. Use the IXRColorAnimationUsingKeyFrames::GetKeyFrames method to obtain the collection of IXRColorKeyFrame objects in your animation.

  5. Use IUnknown::QueryInterface on your IXREasingColorKeyFrame object to get a pointer to the IXRColorKeyFrame interface. Pass the IXRColorKeyFrame pointer to the IXRColorKeyFrameCollection::Add or IXRColorKeyFrameCollection::Insert methods to add your new IXREasingColorKeyFrame object to the collection.

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

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

.NET Framework Equivalent

System.Windows.Media.Animation.EasingColorKeyFrame

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Animation Storyboards