Поделиться через


IXRPointAnimation::SetBy (Compact 2013)

3/28/2014

This method sets the total amount by which the animation changes its starting value.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetBy(
    __in XRPoint* pBy
) = 0;

Parameters

  • pBy
    [in] Pointer to an XRPoint structure that specifies the x-coordinate and the y-coordinate of the animation increment.

Return Value

Returns an HRESULT that returns S_OK if successful; otherwise, returns a non-zero error code.

Remarks

Use this method to animate a value by a specific increment, instead of specifying a starting or ending value. You can also use the SetBy method with the SetFrom method. The following table shows how you can use these methods together or separately to determine the target values of an animation.

Method(s)

Result

SetFrom

The animation progresses from the value specified in SetFrom to the animated property base value or to a previous animation output value, 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 animated property base value or a previous animation output value to the value specified in SetTo.

SetBy

The animation progresses from the animated property base value or from a previous animation output value 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 animate between more than two target values, use the IXREasingPointKeyFrame or IXRPointAnimationUsingKeyFrames object.

.NET Framework Equivalent

System.Windows.Media.Animation.PointAnimation.By

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRPointAnimation
IXRPointAnimation::GetBy