Udostępnij za pośrednictwem


Timeline.Duration Property

Definition

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

Duration Duration();

void Duration(Duration value);
public Duration Duration { get; set; }
var duration = timeline.duration;
timeline.duration = duration;
Public Property Duration As Duration
<timeline Duration="[days.]hours:minutes:seconds[.fractionalSeconds]"/>
-or-
<timeline Duration="Automatic" .../>
-or-
<timeline Duration="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 that evaluates as Automatic.

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.

Applies to

See also