DispatcherTimer Class
A timer that is integrated into the Dispatcher queues, and will be processed after a given amount of time at a specified priority.
Definition
Namespace: Avalonia.Threading
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public class DispatcherTimer
Public Class DispatcherTimer
type DispatcherTimer = class end
| Inheritance | Object → DispatcherTimer |
Constructors
| DispatcherTimer() | Creates a timer that uses theUI thread's Dispatcher2 to process the timer event at background priority. |
| DispatcherTimer(DispatcherPriority) | Creates a timer that uses the UI thread's Dispatcher2 to process the timer event at the specified priority. |
| DispatcherTimer(TimeSpan, DispatcherPriority, EventHandler) | Creates a timer that uses the UI thread's Dispatcher2 to process the timer event at the specified priority after the specified timeout. |
Properties
| Dispatcher | Gets the dispatcher this timer is associated with. |
| Interval | Gets or sets the time between timer ticks. |
| IsEnabled | Gets or sets whether the timer is running. |
| Tag | Any data that the caller wants to pass along with the timer. |
Methods
| Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| GetHashCode() | Serves as the default hash function. (Inherited from Object) |
| GetType() | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object) |
| Run(Func(Boolean), TimeSpan, DispatcherPriority) | Starts a new timer. |
| RunOnce(Action, TimeSpan, DispatcherPriority) | Runs a method once, after the specified interval. |
| Start() | Starts the timer. |
| Stop() | Stops the timer. |
| ToString() | Returns a string that represents the current object. (Inherited from Object) |
Events
| Tick | Occurs when the specified timer interval has elapsed and the timer is enabled. |