Condividi tramite


Dispatcher.FromThread(Thread) Metodo

Definizione

Ottiene l'oggetto Dispatcher per il thread specificato.

public:
 static System::Windows::Threading::Dispatcher ^ FromThread(System::Threading::Thread ^ thread);
public static System.Windows.Threading.Dispatcher FromThread(System.Threading.Thread thread);
static member FromThread : System.Threading.Thread -> System.Windows.Threading.Dispatcher
Public Shared Function FromThread (thread As Thread) As Dispatcher

Parametri

thread
Thread

Thread da cui ottenere .Dispatcher

Restituisce

Dispatcher per thread.

Commenti

Se un dispatcher non è disponibile per il thread specificato, null verrà restituito.

FromThread non crea un oggetto Dispatcher in un thread che non dispone di un oggetto Dispatcher. Viene creato un nuovo Dispatcher oggetto in un thread che non dispone già di un Dispatcher oggetto quando si tenta di ottenere Dispatcher usando la CurrentDispatcher proprietà .

Si applica a