MainThreadDispatcherInvokeRequired Property
Gets whether an Invoke is required in order to execute on the thread the MainThreadDispatcher is associated with. Returns true when the current thread is different than the MainThreadDispatcher's thread. Returns false when the MainThreadDispatcher is null or the current thread is the same as the MainThreadDispatcher's thread.
Syntax
public static System.bool MainThreadDispatcherInvokeRequired {get;}Public Shared ReadOnly Property MainThreadDispatcherInvokeRequired As System.Boolean