Timeline.GetNaturalDurationCore(Clock) Method

Definition

Returns the length of a single iteration of this Timeline. This method provides the implementation for GetNaturalDuration(Clock).

C#
protected virtual System.Windows.Duration GetNaturalDurationCore(System.Windows.Media.Animation.Clock clock);

Parameters

clock
Clock

The Clock that was created for this Timeline.

Returns

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

Remarks

This method provides the implementation for GetNaturalDuration and should not be called directly from your code. Use GetNaturalDuration instead.

Notes to Inheritors

This method should be implemented by timeline classes that need to provide a custom natural Duration when the Duration property is set to Automatic. If the author cannot determine the natural duration, this method should return Automatic.

Applies to

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also