Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IUIAnimationInterpolator::GetDependencies method

Gets the aspects of the interpolator that depend on the initial value or velocity passed to SetInitialValueAndVelocity, or that depend on the duration passed to SetDuration.


HRESULT GetDependencies(
  [out] UI_ANIMATION_DEPENDENCIES *initialValueDependencies,
  [out] UI_ANIMATION_DEPENDENCIES *initialVelocityDependencies,
  [out] UI_ANIMATION_DEPENDENCIES *durationDependencies


initialValueDependencies [out]

Aspects of the interpolator that depend on the initial value passed to SetInitialValueAndVelocity.

initialVelocityDependencies [out]

Aspects of the interpolator that depend on the initial velocity passed to SetInitialValueAndVelocity.

durationDependencies [out]

Aspects of the interpolator that depend on the duration passed to SetDuration.

Return value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. See Windows Animation Error Codes for a list of error codes.


This method is called to identify which aspects of the custom interpolator are affected by certain inputs: value, velocity, and duration. For each of these inputs, the interpolator returns either of the following:

  • The bitwise-OR of any members of UI_ANIMATION_DEPENDENCIES that apply.
  • UI_ANIMATION_DEPENDENCY_NONE if nothing depends on the input.

For example, consider an interpolator (1) that accepts a final value as a parameter, (2) that always comes to a gradual stop at that final value, and (3) whose duration is determined by the difference between the final and initial values. The interpolator should return UI_ANIMATION_DEPENDENCY_INTERMEDIATE_VALUES|UI_ANIMATION_DURATION for initialValueDependencies. It should not return UI_ANIMATION_DEPENDENCY_FINAL_VALUE because this is set when the interpolator is created and is not affected by the initial value. Likewise it should not return UI_ANIMATION_DEPENDENCY_FINAL_VELOCITY because the slope of the curve is defined to always be zero when it reaches the final value.

It is important that an interpolator return correct set of flags. If a flag is not present for an output, Windows Animation assumes that the corresponding parameter does not affect that aspect of the interpolator's results. For example, if the custom interpolator does not include UI_ANIMATION_DEPENDENCY_FINAL_VALUE for initialVelocityDependencies, Windows Animation may call SetInitialValueAndVelocity with an arbitrary velocity parameter, then call GetFinalValue to determine the final value. The interpolator's implementation of GetFinalValue must return the same result no matter what velocity parameter has been passed to SetInitialValueAndVelocity because the interpolator has claimed that the transition's final value does not depend on the initial velocity.

Note  If the flags returned for durationDependencies do not include UI_ANIMATION_DEPENDENCY_DURATION, SetDuration will never be called on the interpolator.


Minimum supported client

Windows 7, Windows Vista and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

None supported







See also




© 2018 Microsoft