title: Xamarin ProgressDialog
body: <p>I am building  <code>Xamarin</code> android app and I have a function that needs some time.
  Now, I am  trying to display a <code>ProgressDialog</code> and execute the function. 
  The code below do not show the <code>ProgressDialog</code>, I just see nothing. Can you please help me ?</p>
  
  <pre><code>private void BtButton_Click(object sender, System.EventArgs e)
  {
  
      ProgressDialog mDialog = new ProgressDialog(this);
      mDialog.SetMessage("Loading data...");
      mDialog.SetCancelable(false);
      mDialog.Show();
  
      Task t = Task.Run(() =&gt; { Foo(); });
      t.Wait();
      mDialog.Dismiss();
  }
  
  private void Foo()
  {
      for (int i = 0; i &lt; 10; i++)
      {
          Thread.Sleep(1000);
      }
  }
  </code></pre>