I think that IsEnabled = false/true is equally the same with Stop/Start method of class System.Windows.Threading.DispatcherTimer
Am I right?
[EDIT]
Start() : begin timer with a full interval countdown.
IsEnabled = false : pause the timer, the interval countdown remains.
IsEnabled = true : resume the timer & continue with the last used interval countdown.
Stop() : stop the timer, will the interval countdown reset?
Considering that
Start/Stoptoggles theIsEnabledproperty, your assumption is close.Start/Stopdiffers as theIntervalis reset, where as just toggling theIsEnabledwill not reset theInterval.From MSDN:
EDIT:
What I mean by the interval being reset is not the Interval property itself, but the background interval that determines how long until the next tick event is fired.
Eg. If you have an interval of 1000ms and you stop/disable it if with 250ms to run (it’s run for 750ms), this is the result depending on how you start it again.
Start(), then the passed interval will be reset back to 0 and it will be 1000ms before theTickevent is raised.IsEnabled = truethen it will continue from it’s current location and theTickevent will be raised in 250ms.I hope this clarifies it for you.