Clock.CurrentProgress 屬性

定義

取得這個 Clock 在其目前反覆項目內的目前進度。Gets the current progress of this Clock within its current iteration.

public:
 property Nullable<double> CurrentProgress { Nullable<double> get(); };
public double? CurrentProgress { get; }
member this.CurrentProgress : Nullable<double>
Public ReadOnly Property CurrentProgress As Nullable(Of Double)

屬性值

如果這個時鐘是 Stopped 則為 null,如果這個時鐘在使用中且其 TimelineDurationForever,則為 0.0,否則為介於 0.0 與 1.0 之間的值,表示這個時鐘在其目前反覆項目內的目前進度。null if this clock is Stopped, or 0.0 if this clock is active and its Timeline has a Duration of Forever; otherwise, a value between 0.0 and 1.0 that indicates the current progress of this Clock within its current iteration. 值 0.0 表示沒有進度,而值 1.0 表示時鐘已到目前反覆運算的結尾。A value of 0.0 indicates no progress, and a value of 1.0 indicates that the clock is at the end of its current iteration.

備註

這個屬性的值表示 CurrentTime 由此時鐘 TimelineDuration 正規化。The value of this property indicates the CurrentTime normalized by the Duration of this clock's Timeline.

Filling 的時鐘具有1.0 的 CurrentProgressA clock that is Filling has a CurrentProgress of 1.0.

使用時間表做為計時器Using a Timeline as a Timer

只有當有相關聯的事件處理常式或(如果是 AnimationClock 物件)與屬性相關聯時,時間軸的時鐘才會進行。A timeline's clock will only progress when there's an event handler associated with it or (in the case of an AnimationClock object) it is associated with a property. 基於這個理由(及其他),不建議您使用 Timeline 做為計時器。For this reason (and others), it's not recommended that you use a Timeline as a timer.

適用於