Clock.CurrentStateInvalidated 事件


当更新时钟的 CurrentState 属性时发生。Occurs when the clock's CurrentState property is updated.

 event EventHandler ^ CurrentStateInvalidated;
public event EventHandler CurrentStateInvalidated;
member this.CurrentStateInvalidated : EventHandler 
Public Custom Event CurrentStateInvalidated As EventHandler 




CurrentStateInvalidated如果要在时钟开始、停止或填充时收到通知,请使用事件。Use the CurrentStateInvalidated event when you want to be notified if when the clock starts, stops, or fills. Object EventHandler 事件处理程序的参数是 Clock 其状态无效的。The Object parameter of the EventHandler event handler is the Clock whose state was invalidated.

暂停 Clock 不会更改其 CurrentStatePausing a Clock does not change its CurrentState. 若要在时钟暂停时得到通知,请使用 CurrentGlobalSpeedInvalidated 事件。To be notified when a clock becomes paused, use the CurrentGlobalSpeedInvalidated event.

尽管在变为无效时发生此事件 ClockState ,但并不一定表示 ClockState 更改:在 Clock Active 相同的 Filling 勾选标记中切换到后再返回到的将 Active 导致触发此事件,但其 CurrentState 属性不会实际更改。Although this event occurs when the ClockState becomes invalid, that doesn't necessarily mean the ClockState changed: a Clock that switches from Active to Filling and then back to Active in the same tick will cause this event to fire, but its CurrentState property won't actually change.