andrew4582

InvokeRequired

Feb 11th, 2013
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.27 KB | None | 0 0
  1.         /// <summary>
  2.         /// Determines if caller is required to use Invoke/BeginInvoke to access UI thread
  3.         /// </summary>
  4.         public static bool InvokeRequired()
  5.         {
  6.             return Application.Current.Dispatcher.Thread.ManagedThreadId != Thread.CurrentThread.ManagedThreadId;
  7.         }
Advertisement
Add Comment
Please, Sign In to add comment