Information
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.

IUIAnimationStoryboard2::AddTransitionBetweenKeyframes method

Adds a transition between two keyframes.

Syntax


HRESULT AddTransitionBetweenKeyframes(
  [in]  IUIAnimationVariable2 *variable,
  [in]  IUIAnimationTransition2 *transition,
  [in]  UI_ANIMATION_KEYFRAME startKeyframe,
  [in]  UI_ANIMATION_KEYFRAME endKeyframe
);

Parameters

variable [in]

The animation variable for which the transition is to be added.

transition [in]

The transition to be added.

startKeyframe [in]

A keyframe that specifies the beginning of the new transition.

endKeyframe [in]

A keyframe that specifies the end of the new transition. It must not be possible for endKeyframe to appear earlier in the storyboard than startKeyframe.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Return codeDescription
UI_E_TRANSITION_ALREADY_USED

This transition has already been added to a storyboard or has been added to a storyboard that has finished playing and been released.

UI_E_TRANSITION_ECLIPSED

The transition might eclipse the beginning of another transition in the storyboard.

UI_E_START_KEYFRAME_AFTER_END

The start keyframe might occur after the end keyframe.

 

See Windows Animation Error Codes for a list of error codes.

Remarks

This method applies the specified transition to the specified variable in the storyboard, with the transition starting and ending at the specified keyframes. If the transition was created with a duration parameter specified, that duration is overwritten with the duration of time between the start and end keyframes. Otherwise, Windows Animation speeds up or slows down the transition as necessary.

A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.

Transitions must be added in the order in which they will be played. A transition may begin playing before the preceding transition in the storyboard has finished, in which case the initial value and velocity seen by the new transition will be determined by the state of the preceding one. It must not be possible for a transition to begin before the start of the preceding transition.

Requirements

Minimum supported client

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

Minimum supported server

None supported [desktop apps | Windows Store apps]

Header

UIAnimation.h

IDL

UIAnimation.idl

DLL

UIAnimation.dll

IID

IID_IUIAnimationStoryboard2 is defined as AE289CD2-12D4-4945-9419-9E41BE034DF2

See also

IUIAnimationStoryboard2
IUIAnimationStoryboard2::AddKeyframeAfterTransition
IUIAnimationStoryboard2::AddKeyframeAtOffset
IUIAnimationStoryboard2::AddTransition
IUIAnimationStoryboard2::AddTransitionAtKeyframe
IUIAnimationTransition2
IUIAnimationTransitionLibrary2

 

 

Community Additions

Show:
© 2014 Microsoft. All rights reserved.