Enables shared control of the message pump between Win32 and WPF in interoperation scenarios.
Assembly: WindowsBase (in WindowsBase.dll)
Thetype exposes the following members.
|EnterThreadModal||Occurs when a thread becomes modal.|
|LeaveThreadModal||Occurs when a modal thread becomes nonmodal.|
|ThreadFilterMessage||Occurs when the message pump receives a keyboard message.|
|ThreadIdle||Occurs when the thread is idle.|
|ThreadPreprocessMessage||Occurs when the message pump receives a keyboard message.|
Although the class itself is static, all members of are specific to a particular thread. For example, if you examine the value of IsThreadModal on two different threads, you might get different values.
The methods are static but they are backed by per-thread data structures. The static methods allow singleton access but the is sorting out the appropriate per-thread operations.
The owner of the message pump is defined by the code that calls the Win32 function GetMessage. The owner calls RaiseThreadMessage for every keyboard message. This method raises the ThreadFilterMessage event with the messages contained in the event data. If that event is not handled, the owner raises the ThreadPreprocessMessage event with the messages contained in the event argument.
Only keyboard messages are supported.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.