Clock.CurrentTime Clock.CurrentTime Clock.CurrentTime Clock.CurrentTime Property

定義

取得這個時鐘在其目前反覆項目內的目前時間。Gets this clock's current time within its current iteration.

public:
 property Nullable<TimeSpan> CurrentTime { Nullable<TimeSpan> get(); };
public Nullable<TimeSpan> CurrentTime { get; }
member this.CurrentTime : Nullable<TimeSpan>
Public ReadOnly Property CurrentTime As Nullable(Of TimeSpan)

屬性值

如果這個時鐘是 Stopped 則為 null,否則為這個時鐘的目前時間。null if this clock is Stopped; otherwise, the current time of this clock.

備註

使用時間表做為計時器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.

適用於

另請參閱