Sprache

MainThread Klasse

Definition

Mit der MainThread-Klasse können Anwendungen Code im Hauptausführungsthread ausführen und bestimmen, ob ein bestimmter Codeblock aktuell im Hauptthread ausgeführt wird.

public ref class MainThread abstract sealed
public static class MainThread
type MainThread = class
Public Class MainThread
Vererbung
MainThread

Hinweise

Hauptthreadhilfsprogramme.

Eigenschaften

Name Beschreibung
IsMainThread

True, wenn der aktuelle Thread der UI-Thread ist.

Methoden

Name Beschreibung
BeginInvokeOnMainThread(Action)

Ruft eine Aktion im Standard Thread der Anwendung auf.

GetMainThreadSynchronizationContextAsync()

Ruft den synchonisierungskontext der Standard Threads ab.

InvokeOnMainThreadAsync(Action)

Ruft eine Aktion im Standard Thread der Anwendung asynchron auf.

InvokeOnMainThreadAsync(Func<Task>)

Ruft eine Funktion im Standard Thread der Anwendung asynchron auf.

InvokeOnMainThreadAsync<T>(Func<T>)

Ruft eine Funktion im Standard Thread der Anwendung asynchron auf.

InvokeOnMainThreadAsync<T>(Func<Task<T>>)

Ruft eine Funktion im Standard Thread der Anwendung asynchron auf.

Gilt für: