DispatcherTimer Konstruktorer

Definition

Initierar en ny instans av DispatcherTimer klassen.

Överlagringar

Name Description
DispatcherTimer()

Initierar en ny instans av DispatcherTimer klassen.

DispatcherTimer(DispatcherPriority)

Initierar en ny instans av DispatcherTimer klassen som bearbetar tidsinställda händelser med den angivna prioriteten.

DispatcherTimer(DispatcherPriority, Dispatcher)

Initierar en ny instans av DispatcherTimer klassen som körs på den angivna Dispatcher prioriteten.

DispatcherTimer(TimeSpan, DispatcherPriority, EventHandler, Dispatcher)

Initierar en ny instans av DispatcherTimer klassen som använder det angivna tidsintervallet, prioriteten, händelsehanteraren och Dispatcher.

DispatcherTimer()

Initierar en ny instans av DispatcherTimer klassen.

public:
 DispatcherTimer();
public DispatcherTimer();
Public Sub New ()

Kommentarer

DispatcherTimer körs på den Dispatcher aktuella trådens Background prioritet. Om du vill ange en annan Dispatcheranvänder du följande konstruktor: DispatcherTimer.DispatcherTimer(DispatcherPriority, Dispatcher).

Gäller för

DispatcherTimer(DispatcherPriority)

Initierar en ny instans av DispatcherTimer klassen som bearbetar tidsinställda händelser med den angivna prioriteten.

public:
 DispatcherTimer(System::Windows::Threading::DispatcherPriority priority);
public DispatcherTimer(System.Windows.Threading.DispatcherPriority priority);
new System.Windows.Threading.DispatcherTimer : System.Windows.Threading.DispatcherPriority -> System.Windows.Threading.DispatcherTimer
Public Sub New (priority As DispatcherPriority)

Parametrar

priority
DispatcherPriority

Prioriteten som timern ska anropas för.

Kommentarer

DispatcherTimer körs på den Dispatcher aktuella tråden. Om du vill ange en annan Dispatcheranvänder du följande konstruktor: DispatcherTimer(DispatcherPriority, Dispatcher).

Gäller för

DispatcherTimer(DispatcherPriority, Dispatcher)

Initierar en ny instans av DispatcherTimer klassen som körs på den angivna Dispatcher prioriteten.

public:
 DispatcherTimer(System::Windows::Threading::DispatcherPriority priority, System::Windows::Threading::Dispatcher ^ dispatcher);
public DispatcherTimer(System.Windows.Threading.DispatcherPriority priority, System.Windows.Threading.Dispatcher dispatcher);
new System.Windows.Threading.DispatcherTimer : System.Windows.Threading.DispatcherPriority * System.Windows.Threading.Dispatcher -> System.Windows.Threading.DispatcherTimer
Public Sub New (priority As DispatcherPriority, dispatcher As Dispatcher)

Parametrar

priority
DispatcherPriority

Prioriteten som timern ska anropas för.

dispatcher
Dispatcher

Den dispatcher som timern är associerad med.

Undantag

dispatcher är null.

Gäller för

DispatcherTimer(TimeSpan, DispatcherPriority, EventHandler, Dispatcher)

Initierar en ny instans av DispatcherTimer klassen som använder det angivna tidsintervallet, prioriteten, händelsehanteraren och Dispatcher.

public:
 DispatcherTimer(TimeSpan interval, System::Windows::Threading::DispatcherPriority priority, EventHandler ^ callback, System::Windows::Threading::Dispatcher ^ dispatcher);
public DispatcherTimer(TimeSpan interval, System.Windows.Threading.DispatcherPriority priority, EventHandler callback, System.Windows.Threading.Dispatcher dispatcher);
new System.Windows.Threading.DispatcherTimer : TimeSpan * System.Windows.Threading.DispatcherPriority * EventHandler * System.Windows.Threading.Dispatcher -> System.Windows.Threading.DispatcherTimer
Public Sub New (interval As TimeSpan, priority As DispatcherPriority, callback As EventHandler, dispatcher As Dispatcher)

Parametrar

interval
TimeSpan

Tidsperioden mellan fästingar.

priority
DispatcherPriority

Prioriteten som timern ska anropas för.

callback
EventHandler

Händelsehanteraren som ska anropas när händelsen Tick inträffar.

dispatcher
Dispatcher

Den dispatcher som timern är associerad med.

Undantag

callback är null.

-eller-

dispatcher är null.

interval är mindre än 0 eller större än Int32.MaxValue.

Gäller för