Dispatcher.FromThread(Thread) Metodo

Definizione

Ottiene Dispatcher per il thread specificato.Gets the Dispatcher for the specified thread.

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 dal quale ottenere Dispatcher.The thread to obtain the Dispatcher from.

Restituisce

Dispatcher

Dispatcher per thread.The dispatcher for thread.

Commenti

Se un dispatcher non è disponibile per il thread specificato, null verrà restituito.If a dispatcher is not available for the specified thread, null will be returned.

FromThread non crea un oggetto Dispatcher in un thread che non dispone di un oggetto Dispatcher .FromThread does not create a Dispatcher on a thread that does not have a Dispatcher. Viene creato un nuovo oggetto Dispatcher in un thread che non dispone già di un oggetto Dispatcher quando si tenta di ottenere Dispatcher utilizzando la CurrentDispatcher Proprietà.A new Dispatcher is created on a thread that does not already have a Dispatcher when attempting to get the Dispatcher by using the CurrentDispatcher property.

Si applica a