This documentation is archived and is not being maintained.

Timeline.GetNaturalDuration Method

Returns the length of a single iteration of this Timeline.

Namespace: System.Windows.Media.Animation
Assembly: PresentationCore (in presentationcore.dll)

protected internal Duration GetNaturalDuration (
	Clock clock
)
protected Duration GetNaturalDuration (
	Clock clock
)
protected internal function GetNaturalDuration (
	clock : Clock
) : Duration
You cannot use methods in XAML.

Parameters

clock

The Clock that was created for this Timeline.

Return Value

The length of a single iteration of this Timeline, or Automatic if the natural duration is unknown.

This method should only be called when the Duration property is set to Automatic. If Duration is Automatic, the natural duration is determined by that particular class's implementation of GetNaturalDurationCore.

If GetNaturalDuration returns Automatic, it means that the natural duration is unknown, which implies a natural duration of Forever. Such is the case for streaming media.

Note that passing this method a clock other than the one that was created for this timeline is possible, but will provide unreliable results.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: