Compartilhar via


KeyFrames (ColorAnimationUsingKeyFrames)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the collection of ColorKeyFrame objects that define an animation.

<ColorAnimationUsingKeyFrames ...>
  oneOrMoreColorKeyFrames
</ColorAnimationUsingKeyFrames>
value = object.KeyFrames
object.KeyFrames = value

XAML Values

Value

Description

oneOrMoreColorKeyFrames

One or more ColorKeyFrame object elements that define the key frames for the animation. These can be any mixture of LinearColorKeyFrame, DiscreteColorKeyFrame, and SplineColorKeyFrame.

Property Value

Type: ColorKeyFrameCollection

The collection of ColorKeyFrame objects that define the key frames for the animation.

This property is read/write. The default value is an empty collection.

Managed Equivalent

KeyFrames

Remarks

The XAML syntax for properties that use a ColorKeyFrameCollection is an example of an implicit collection syntax, where you can omit the ColorKeyFrameCollection object element and the ColorAnimationUsingKeyFrames.KeyFrames property element. Instead, you generally include one or more DiscreteColorKeyFrame, LinearColorKeyFrame, or SplineColorKeyFrame object elements as child elements of a ColorAnimationUsingKeyFrames object. Explicitly including a ColorKeyFrameCollection object element is permissible XAML syntax, and might be useful if you intend to name the collection in XAML and manipulate its contents through script later.