--- title: "How to: Simplify Animations by Using Child Timelines" ms.date: "03/30/2017" helpviewer_keywords: - "simplifying animations by child timelines [WPF]" - "animation [WPF], simplifying by child timelines" - "child timelines [WPF]" ms.assetid: 8335d770-d13d-42bd-8dfa-63f92c0327e2 --- # How to: Simplify Animations by Using Child Timelines This example shows how to simplify animations by using child objects. A is a type of that provides targeting information for the timelines it contains. Use a to provide timeline targeting information, including object and property information. To begin an animation, use one or more objects as nested child elements of a . These objects can contain other animations and therefore, can better encapsulate the timing sequences in complex animations. For example, if you are animating a and several shapes in the same , you can separate the animations for the and the shapes, putting each into a separate . Because each has its own and all child elements of the begin relative to this , timing is better encapsulated. The following example animates two pieces of text ( objects) from within the same . A encapsulates the animations of one of the objects. **Performance Note:** Although you can nest timelines inside each other, s are more suitable for nesting because they require less overhead. (The class inherits from the class.) ## Example [!code-xaml[Timelines_snip#ParallelTimelineWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/Timelines_snip/CS/ParallelTimelineExample.xaml#paralleltimelinewholepage)] ## See also - [Animation Overview](animation-overview.md) - [Specify HandoffBehavior Between Storyboard Animations](how-to-specify-handoffbehavior-between-storyboard-animations.md)