Dispatcher.FromThread(Thread) Method

Definition

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

Parameters

thread
Thread

The thread to obtain the Dispatcher from.

Returns

The dispatcher for thread.

Remarks

If a dispatcher is not available for the specified thread, null will be returned.

FromThread does not create a Dispatcher on a thread that does not have a Dispatcher. 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.

Applies to