Children Property (Storyboard)

Gets the collection of collection of child Timeline objects.

XAML
<Storyboard>
  oneOrMoreChildTimelines
</Storyboard>
Scripting
value = object.Children

XAML Values

oneOrMoreChildTimelines One or more object elements that derive from Timeline. These can be one or more of the following: Storyboard, ColorAnimation, ColorAnimationUsingKeyFrames, DoubleAnimation, DoubleAnimationUsingKeyFrames, PointAnimation, PointAnimationUsingKeyFrames.

Property Value

TimelineCollection

The collection of child Timeline objects.

This property is read-only. You can use implicit collection syntax in XAML or methods of the TimelineCollection in script to add items or otherwise adjust the existing collection, but you cannot replace it with a different object. The default value is an empty collection.

Remarks

The XAML syntax for Children is an example of an implicit collection syntax. In this case, because the property is read-only, neither the explicit property element tag <Storyboard.Children> nor the object element for the explicit collection <TimelineCollection> is permitted by the XAML parser. The implicit collection syntax of placing one or more child elements as direct child elements of a Storyboard object element is the only permitted XAML syntax. For more information about XAML implicit collection syntax, see XAML Syntax Overview.

The Children property accepts one or more of any of the following: ColorAnimation, ColorAnimationUsingKeyFrames, DoubleAnimation, DoubleAnimationUsingKeyFrames, PointAnimation, PointAnimationUsingKeyFrames. It also accepts Storyboard. Nesting storyboards can be a useful technique for grouping or ungrouping animations that should sometimes play separately or sometimes together, or for applying properties such as the RepeatBehavior to a group.

In scripting, you can get the value of Children and retain it for later operations against the collection, but you cannot set the Children property directly by any means. Instead, you typically use CreateFromXaml to create a single node at a time and then add that node to the TimelineCollection using the syntax object.Children.Add(xamlNode).

Applies To

Storyboard

See Also

Animation Overview
Interactive Animations Overview