Skip to content

DispatcherTimer class

UI-thread timer that raises Tick on the application’s dispatcher.

Guide: C# Markup reference: Misc

public sealed class DispatcherTimer : IDisposable
name description
DispatcherTimer() Creates a stopped timer with a one second interval.
DispatcherTimer(…) Creates a stopped timer with the given interval.
Interval { get; set; } Gets or sets the time between Tick events.
IsEnabled { get; } Gets whether the timer is currently running.
event Tick Occurs when the timer interval elapses on the UI dispatcher.
Dispose() Stops the timer.
Start() Starts the timer, deferring the first tick until the application dispatcher is available.
Stop() Stops the timer and cancels any scheduled tick.