Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 2.97 KB

timeline_duration.md

File metadata and controls

49 lines (37 loc) · 2.97 KB
-api-id -api-type
P:Windows.UI.Xaml.Media.Animation.Timeline.Duration
winrt property

Windows.UI.Xaml.Media.Animation.Timeline.Duration

-description

Gets or sets the length of time for which this timeline plays, not counting repetitions.

-xaml-syntax

<timeline Duration="[days.]hours:minutes:seconds[.fractionalSeconds]"/>
-or-
<timeline Duration="Automatic" .../>
-or-
<timeline Duration="Forever" .../>

-xaml-values

days
daysAn integer value greater than or equal to 0 that specifies the number of days.
hours
hoursAn integer value between 0 and 23 that specifies the number of hours. If you specify a Duration as a XAML attribute, an hours component is required, even if is 0.
minutes
minutesAn integer value between 0 and 59 that specifies the number of minutes. Set hours:minutes components as 0:0 if you are setting only a seconds component.
seconds
secondsAn integer value between 0 and 59 that specifies the number of seconds. Set hours:minutes components as 0:0 if you are setting only a seconds component.
fractionalSeconds
fractionalSecondsOptional. A decimal value consisting of 1 to 7 positions past the decimal point, which specifies fractional seconds.
Automatic
AutomaticThe literal string Automatic.
Forever
ForeverThe literal string Forever.
## -property-value The timeline's simple duration: the amount of time this timeline takes to complete a single forward iteration. The default value is a [Duration](../windows.ui.xaml/duration.md) that evaluates as [Automatic](../windows.ui.xaml/durationhelper_automatic.md).

-remarks

A Duration value has a TimeSpan component.

  • For Visual C++ component extensions (C++/CX), the data value of a Duration is a property named TimeSpan. This has a TimeSpan structure value, and that structure has a field named Duration that reports the duration as an int64 that counts in 100-nanosecond units. TimeSpan doesn't have any methods for getting components of the time in hours:minutes:seconds format.
  • For C# or Microsoft Visual Basic, you can use utility methods of System.TimeSpan to get the duration components in whatever format you want. For example you can get TimeSpan.Hours, TimeSpan.Minutes and TimeSpan.Seconds separately.
  • For more info, see Remarks in the Duration reference topic.

-examples

-see-also

Storyboarded animations