O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tweaking Animations with Timeline Properties

Now is a good time to look at the Timeline properties that are useful for every animation, whether it’s a custom animation or a theme animation.

BeginTime

If you don’t want an animation to begin immediately when you call its storyboard’s Begin method (or trigger it via XAML), you can insert a delay by setting BeginTime to an instance of a TimeSpan:

<DoubleAnimation To="100" BeginTime="0:0:2" />

This delays the animation by two seconds.

Besides being potentially useful in isolation, BeginTime can be useful for specifying a sequence of animations that start one after the other. You can even set BeginTime to a negative value:

<!-- Start the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required