Ejemplo n.º 1
0
 private void OnUiThread(OnUiThreadDelegate onUiThreadDelegate)
 {
     if (Deployment.Current.Dispatcher.CheckAccess())
     {
         onUiThreadDelegate();
     }
     else
     {
         Deployment.Current.Dispatcher.BeginInvoke(onUiThreadDelegate);
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
0
 private void OnUiThread(OnUiThreadDelegate onUiThreadDelegate)
 {
     if (Deployment.Current.Dispatcher.CheckAccess())
     {
         onUiThreadDelegate();
     }
     else
     {
         Deployment.Current.Dispatcher.BeginInvoke(onUiThreadDelegate);
     }
 }