Clock.CurrentProgress 属性


获取此 Clock 在其当前迭代中的当前进度。Gets the current progress of this Clock within its current iteration.

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


如果此时钟为 Stopped,则为 null;如果此时钟处于活动状态并且其 Timeline 具有 DurationForever,则为 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此时钟的Timeline的规范化DurationThe value of this property indicates the CurrentTime normalized by the Duration of this clock's Timeline.

的时钟的类型Filling CurrentProgress为1.0。A 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.