title: How do I make a Silverlight Progressbar update according to its value?
body: <p>I am making a Progressbar as part of my Silverlight application that is triggered when a user clicks a button. For now, I just have it update by random increments at random times so that I can make sure it works as I need it to. The code that updates the value of the Progressbar is rather trivial, but the actual display of the Progressbar never updates. The code I use for this is here:</p>
  
  <pre><code>Random randomGen = new Random();
  
  while (submitProgress.Value &lt; submitProgress.Maximum)
  {
      System.Threading.Thread.Sleep(randomGen.Next(100, 500));
      submitProgress.Value += randomGen.Next(3, 7);
  }
  </code></pre>
  
  <p>The XAML I use to create the Progressbar is here:</p>
  
  <pre><code>&lt;ProgressBar Grid.Row="2" Height="30" Width="400" IsIndeterminate="False" 
  Minimum="0" Maximum="100" Value="0" Name="submitProgress"&gt;&lt;/ProgressBar&gt;
  </code></pre>
  
  <p>To be clear, the Progressbar does update to its completed state when it is finished, but there are no intermediate updates from start to finish. If you need any more information from me, please let me know. Thank you!</p>