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

Controlling Duration

Both DoubleAnimations used thus far have the default duration of one second, but you can change this by setting its Duration property inherited from Timeline:

<DoubleAnimation From="0" To="1" Duration="0:0:5" />

This changes the duration to five seconds. The syntax for specifying the length of time in XAML is the same as what TimeSpan.Parse accepts: days.hours:minutes:seconds.fraction.

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