Dispatcher.FromThread(Thread) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應