Timeline.GetNaturalDuration(Clock) Method

Definition

Devuelve la longitud de una sola iteración de este objeto Timeline.Returns the length of a single iteration of this Timeline.

protected public:
 System::Windows::Duration GetNaturalDuration(System::Windows::Media::Animation::Clock ^ clock);
protected internal System.Windows.Duration GetNaturalDuration (System.Windows.Media.Animation.Clock clock);
member this.GetNaturalDuration : System.Windows.Media.Animation.Clock -> System.Windows.Duration
Protected Friend Function GetNaturalDuration (clock As Clock) As Duration

Parameters

clock
Clock

Objeto Clock creado para este objeto Timeline.The Clock that was created for this Timeline.

Returns

Duration

Longitud de una sola iteración de Timeline o Automatic si la duración natural se desconoce.The length of a single iteration of this Timeline, or Automatic if the natural duration is unknown.

Remarks

Solo se debe llamar a este método cuando la propiedad Duration está establecida en Automatic.This method should only be called when the Duration property is set to Automatic. Si Duration es Automatic, la duración natural viene determinada por la implementación de GetNaturalDurationCorede la clase concreta.If Duration is Automatic, the natural duration is determined by that particular class's implementation of GetNaturalDurationCore.

Si GetNaturalDuration devuelve Automatic, significa que la duración natural es desconocida, lo que implica una duración natural de Forever.If GetNaturalDuration returns Automatic, it means that the natural duration is unknown, which implies a natural duration of Forever. Este es el caso de los medios de streaming.Such is the case for streaming media.

Tenga en cuenta que es posible pasar este método a un reloj que no sea el que se creó para esta escala de tiempo, pero proporcionará resultados no confiables.Note that passing this method a clock other than the one that was created for this timeline is possible, but will provide unreliable results.

Applies to

See also