IXRPointAnimation (Compact 2013)
3/28/2014
This class animates the value of an XRPoint between two target values by interpolating over a duration specified by the inherited method IXRTimeline::SetDuration.
Syntax
class IXRPointAnimation : public IXRTimeline
Inheritance Hierarchy
IXRPointAnimation
Methods
Method |
Description |
---|---|
Retrieves the total difference between the starting and ending values of the animation. |
|
Retrieves the easing function that is applied to this animation. |
|
Retrieves the starting value of this animation. |
|
Retrieves the ending value of this animation. |
|
Sets the total difference between the starting and ending values of the animation. |
|
Sets the easing function that is applied to this animation. |
|
Sets the starting value of this animation. |
|
Sets the ending value of this 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 animation updates the value of a property over a period of time. Animation effects can be subtle, such as moving an IXRShape object several pixels left or right, or dramatic, such as enlarging an object to 200 times its original size while spinning it and changing its color. To create an animation, you associate an animation with a property value that belongs to an object. To identify a target property to animate, use the inherited IXRDependencyObject::SetAttachedProperty method.
The IXRPointAnimation class creates a transition between two target x-y coordinates, or points. To set its target values, use its SetFrom, SetTo, and SetBy methods. The following table shows how these methods can be used together or separately to determine target values of an animation.
Method(s) used by the developer |
Resulting behavior |
---|---|
SetFrom |
The animation progresses from the value specified in SetFrom to the base value of the animated property or to the output value of a previous animation, depending on how the previous animation is configured. |
SetFrom and SetTo |
The animation progresses from the value specified in SetFrom to the value specified in SetTo. |
SetFrom and SetBy |
The animation progresses from the value specified in SetFrom to the sum of values specified in SetFrom and SetBy. |
SetTo |
The animation progresses from the base value of an animated property or the output value of a previous animation to the value specified in SetTo. |
SetBy |
The animation progresses from the base value of the animated property or from the output value of a previous animation to the sum of that value and the value specified in SetBy. |
If you use both the SetTo and SetBy methods, the value specified in SetTo takes precedence and the SetBy property is ignored.
To use other interpolation methods or to define an animation that progresses through more than two target values, use the IXRPointAnimation::SetEasingFunction method, or use the IXRPointAnimationUsingKeyFrames object.
When you create a class instance, use an IXRPointAnimationPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.
You can also define a point 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 PointAnimation Class on MSDN.
.NET Framework Equivalent
System.Windows.Media.Animation.PointAnimation
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |
See Also
Reference
Classes for Animation Storyboards
Classes for Visual Appearance
IXRStoryboard