While the various animation classes that extend the
Timeline class can be used to animate control properties directly in code, in order to declare and trigger animations using XAML alone, we need to use the
Storyboard class. This is what is known as a container timeline, as it extends the abstract
TimelineGroup class that enables it to contain child timelines.
Another container timeline class that the
Storyboard class extends is the
ParallelTimeline class and these classes enable us to group child timelines and to set properties on them as a group. When creating more complex animations, if all we need to do is to delay the start of a group of child timelines, we should use the
ParallelTimeline class rather than the
Storyboard class, as it is more efficient.
We could rewrite our earlier
BeginTime example to use a
ParallelTimeline element to delay the start of our last two timelines. Let's see what that might look like.
<Storyboard> <DoubleAnimation Storyboard...