Example #1
0
 private void OnUiThread(OnUiThreadDelegate onUiThreadDelegate)
 {
     if (Deployment.Current.Dispatcher.CheckAccess())
     {
         onUiThreadDelegate();
     }
     else
     {
         Deployment.Current.Dispatcher.BeginInvoke(onUiThreadDelegate);
     }
 }
Example #2
0
 protected void OnUiThread(OnUiThreadDelegate onUiThreadDelegate)
 {
     // Are we on the Dispatcher thread ?
     if (Deployment.Current.Dispatcher.CheckAccess())
     {
         onUiThreadDelegate();
     }
     else
     {
         // We are not on the UI Dispatcher thread so invoke the call on it.
         Deployment.Current.Dispatcher.BeginInvoke(onUiThreadDelegate);
     }
 }
Example #3
0
 private void OnUiThread(OnUiThreadDelegate onUiThreadDelegate)
 {
     if (Deployment.Current.Dispatcher.CheckAccess())
     {
         onUiThreadDelegate();
     }
     else
     {
         Deployment.Current.Dispatcher.BeginInvoke(onUiThreadDelegate);
     }
 }