Dispatcher::VerifyAccess Method ()
Determines whether the calling thread has access to this Dispatcher.
Assembly: WindowsBase (in WindowsBase.dll)
This method is public; therefore, any thread can check to see whether it has access to the Dispatcher.
The following example uses Button was created on. The method takes an object as an argument, which is cast to a Button. The method on the Dispatcher of the Button is called to verify access to the thread.to determine whether a thread has access to the thread that a
If the calling thread does not have access, an InvalidOperationException is thrown. This example catches the exception and pushes a delegate, which accepts a Button as an argument, onto the Dispatcher of the Button. This Dispatcher will do the work of updating the Button.
Available since 3.0