title: can't get progressdialog to show with async await method
body: <p>I'm trying to have a progress dialog show while the app is saving to the database.  I'd like to do it using the async await keywords but I can't get the progress dialog to show.  Do I have to add some run on ui thread syntax to this?  What's the easiest most succint way to add progress dialogs to async methods on my button onclick event?                                                                      </p>
  
  <pre><code>protected override void OnCreate (Bundle bundle)
  {
      base.OnCreate (bundle);
      SetContentView (Resource.Layout.Main);
  
      Button button_submit = FindViewById&lt;Button&gt; (Resource.Id.button_submit);
  
      button_submit.Click += async (object sender, EventArgs e) =&gt;  {
          using (ProgressDialog progressDialog = ProgressDialog.Show (this, "Please wait...", "Saving Data", true))
          {
              try
              {
                  await this.SaveData();
              }
              finally{
                  progressDialog.Dismiss();
              }
          }
  
  
      };
  }
  </code></pre>
  
  <p>Here's the SaveData method</p>
  
  <pre><code>private async Task&lt;bool&gt; SaveData(){
  
  
      try{
          //Validate ();
  
          string connectionString = "Foo"
  
          SqlConnection dbcon;
          using (dbcon = new SqlConnection(connectionString)) {
  
              await dbcon.OpenAsync();
              using (SqlCommand dbcmd = dbcon.CreateCommand()) {
  
                  //MERGE UPSERT
                  string sql = "bar"
  
                  dbcmd.CommandText = sql;
                  dbcmd.Parameters.AddWithValue("@id", this.scanId);
  
                  dbcmd.Parameters.AddWithValue ("@lat", this.geo[0]); 
                  dbcmd.Parameters.AddWithValue ("@lng", this.geo[1]);
                  dbcmd.Parameters.AddWithValue ("@timestamp", this.timestamp);
                        //commented out to test to make sure slow file io isn't the issue
                  //byte[] imageBytes = System.IO.File.ReadAllBytes (photoUri.Path);
                  //dbcmd.Parameters.AddWithValue ("@photo", imageBytes);
  
                  var result = await dbcmd.ExecuteNonQueryAsync();
  
                  if (result != 1)
                      throw new Exception("Save encountered an error " + result);
              }
          }
          //ResetData ();
          RunOnUiThread(() =&gt; Toast.MakeText (this, "Data Saved", ToastLength.Long).Show ());
          return true;
      }
      catch (Exception ex) {
          RunOnUiThread(() =&gt; Toast.MakeText (this, ex.Message, ToastLength.Long).Show ());
          return false;
      }
  
  
  
  }
  </code></pre>