title: Why does MahApps.Metro ShowProgressAsync dialog box redraw unexpectedly? (always grey)
body: <p>So, I'm guessing a bit, but it looks like my Mahapps.Metro ShowProgressAsync dialog box is redrawing very quickly, so it always looks greyed out.</p>
  
  <p>I have a program that is looking through a document for certain matches based on regex, and I've set up a progress bar, but the dialog just greys out the main application, and then just shows the dialog as grey (like it's loading it over and over very quickly, or freezing).</p>
  
  <p>If I put some sort of stop in there, like a messagebox, then everything shows fine.  I don't think my code should be redrawing the dialog every time.  I thought it should only be updating the progress bar.  Here's my code.  </p>
  
  <p>In this example code, instead of showing the logic where I add a page number to a list, I just added the number 42 over and over, just to make it shorter</p>
  
  <pre><code>    private async void RegexMatchProgressBar(Regex regex, string myText, Microsoft.Office.Interop.Word.Document myDoc)
      {
          int charCount = myDoc.Application.ActiveDocument.Characters.Count;
  
          var myProgressAsync = await this.ShowProgressAsync("WAIT WHILE WE DO STUFF!", "Searching...");
          myProgressAsync.Maximum = charCount;
          myProgressAsync.Minimum = 0;
  
          Dictionary&lt;String, List&lt;int&gt;&gt; table = new Dictionary&lt;string, List&lt;int&gt;&gt;();
          foreach (Match match in regex.Matches(myText))
          {
              if (!table.ContainsKey(match.Value))
              {
                  List&lt;int&gt; page = new List&lt;int&gt;();
                  page.Add(42);
                  table.Add(match.Value, page);
                  myProgressAsync.SetProgress((double)match.Index);
  
              }
          }
          myProgressAsync.SetProgress(charCount);
          await myProgressAsync.CloseAsync();
      }
  </code></pre>