title: WPF Progressbar continue animation
body: <p>I'm using the progress bar of WPF and set the value until the max value.
  But, when reached, the animation (that's the green effect) continues.</p>
  
  <p>How can I stop it and have a full filled green bar, without any animation ?</p>
  
  <p>for example, take this :</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication1.Window1"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Window1" Height="300" Width="300" Loaded="Window_Loaded"&gt;
      &lt;Grid&gt;
          &lt;ProgressBar Height="30" Name="progressBar1" VerticalAlignment="Top" Minimum="0" Maximum="100" /&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>and :</p>
  
  <pre><code>public partial class Window1 : Window
  {
      private double _min;
      private double _max;
  
      public Window1()
      {
          InitializeComponent();
      }
  
      private void Window_Loaded(object sender, RoutedEventArgs e)
      {
          _min = progressBar1.Minimum;
          _max = progressBar1.Maximum;
          Thread thread = new Thread(Start);
          thread.Start();
      }
  
      private void Start()
      {
          for (double i = _min; i &lt;= _max; i++)
          {
              Thread.Sleep(50);
              double value = i;
              Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =&gt; progressBar1.Value = value));
          }
      }
  }
  </code></pre>
  
  <p>When thread has finished, I can always see the animation on the progress bar (the white effect on the green bar)</p>
  
  <p>Thanks in advance for your help</p>