Animation Element

Describes an animation associated with a view item.

Syntax

<Animation
    CenterPointOffset="Vector3"
    CenterPointPercent="Vector3"
    DisableMouseInput="{true | false}"
    Loop="int"
    RotationAxis="Vector3"
    Type="{Alpha | ContentChangeHide | ContentChangeShow | GainFocus | Hide | Idle | LoseFocus | Move | Rotate | Scale | Show | Size}"
>
    <Keyframes />
</Animation>

Attributes

CenterPointOffset

Specifies a center point adjustment based on a pixel-offset value when applying a scale or rotation to the view item. This value is applied after the CenterPointPercent value has been applied if both are provided. Use the inline construction for the Vector3 structure.

CenterPointPercent

Specifies a center point adjustment based on a percentage value when applying a scale or rotation to the view item. This value must be between 0 and 1, where a value of 1 equals 100%. Use the inline construction for the Vector3 structure.

DisableMouseInput

Indicates whether to disable mouse input for the view item when an animation is playing.

Keyframes

Contains the keyframes of the animation.

Include one or more of the following elements to define keyframes:

AlphaKeyframe

ColorKeyframe

PositionKeyframe

RotateKeyframe

ScaleKeyframe

SizeKeyframe

Note   Animations require at least two keyframes of the same type (for example, two AlphaKeyFrames). With only one keyframe, there is no beginning or end, and therefore nothing to animate.

Loop

Specifies the animation repeat count (negative means infinite). The loop count is zero-based. For example, a value of 0 loops the animation once, a value of 1 loops the animation twice, and so forth.

RotationAxis

Specifes a Vector3 of rotation for the animation. Use the inline construction for the Vector3 structure.

Type

Indicates the type of event that this animation will respond to. This value must be a member of the AnimationEventType enumeration.

Remarks

You cannot programmatically stop an animation while it is running.

ContentChangeShow and ContentChangeHide animations are triggered as follows:

  • The Graphic content changes, such as when an image is downloaded.
  • The ColorFill content attribute changes.
  • The Text content attribute changes.
  • The Host source changes.

When using ContentChangeShow and ContentChangeHide animations, if the content hasn't changed, the animation is not performed. However, you can repeat the same animation by invoking the ForceContentChange method on the view item.

Requirements

Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later

See Also