title: Create AlertDialog with ProgressBar in it. (Xamarin.Android)
body: <p>I have created the following alert dialog and progressbar:  </p>
  
  <pre><code>LayoutInflater layoutInflater = LayoutInflater.From(this);
  View progressDialogBox = layoutInflater.Inflate(Resource.Layout.progress_dialog_box, null);
  AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
  alertDialogBuilder.SetView(progressDialogBox);
  var progressBar1 = progressDialogBox.FindViewById&lt;ProgressBar&gt;(Resource.Id.progressBar1);
  progressBar1.Max = 100;
  progressBar1.Progress = 0;
  
  Dialog dialog = alertDialogBuilder.Create();
  dialog.Show();
  </code></pre>
  
  <p>And I make it increase every 2 seconds </p>
  
  <pre><code>System.Threading.Thread.Sleep(2000);
  progressBar1.IncrementProgressBy(25);
  System.Threading.Thread.Sleep(2000);
  progressBar1.IncrementProgressBy(25);
  System.Threading.Thread.Sleep(2000);
  progressBar1.IncrementProgressBy(25);
  System.Threading.Thread.Sleep(2000);
  progressBar1.IncrementProgressBy(25);
  </code></pre>
  
  <p>progress_dialog_box.axml contains that code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
      &lt;TextView
          android:text="Getting data..."
          android:layout_gravity="center"
          android:paddingTop="40dp"
          android:textAppearance="?android:attr/textAppearanceLarge"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
      &lt;ProgressBar
          style="?android:attr/progressBarStyleHorizontal"
          android:layout_gravity="center"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/progressBar1" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>But when I run the application the ProgressBar stays at 0. How can I make it progress?</p>