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 ...
Get Universal Windows® Apps with XAML and C# 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.