KeyFrames Property (ColorAnimationUsingKeyFrames)

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

XAML Property Element Usage
<ColorAnimationUsingKeyFrames ...>
value = object.KeyFrames
object.KeyFrames = value

Property Value


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.


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, as well as the <ColorAnimationUsingKeyFrames.KeyFrames> property element. Instead, you generally include one or more DiscreteColorKeyFrame, LinearColorKeyFrame, or SplineColorKeyFrame object elements as child elements of a ColorAnimationUsingKeyFrames. For more information about XAML implicit collection syntax, see XAML Syntax Overview. (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.)

Applies To


See Also

Animation Overview