Tweaking Storyboards with Timeline Properties

A Storyboard is more than just a simple container that associates animations with target objects and their properties. Because Storyboard derives from Timeline, it has many of the same properties discussed previously: Duration, BeginTime, SpeedRatio, AutoReverse, RepeatBehavior, and FillBehavior (and the Completed event).

The following Storyboard fades one TextBlock in and out at a time, for an effect somewhat like that of a movie trailer. The Storyboard itself is marked with a RepeatBehavior to make the entire sequence of animation repeat indefinitely. Figure 19.8 shows how this is rendered at three different spots of the sequence:

<Page ...>  <Page.Resources>    <

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.