title: How to reset WPF progress bar?
body: <p>I'm testing a WPF progress bar and trying to reset it to its initial state, but it doesn't work.</p>
  
  <pre><code>Duration duration = new Duration(TimeSpan.FromSeconds(1));
  DoubleAnimation doubleanimation = new DoubleAnimation(200.0, duration);
  myProgress.IsIndeterminate = true;
  myProgress.BeginAnimation(ProgressBar.ValueProperty, doubleanimation);
  myProgress.Value = 0;
  </code></pre>
  
  <p>Before animation, the progress bar is static (no animation).
  After animation, the progress bar color is now light gray (lighter than before) with a brightening flash effect. </p>
  
  <p>When commenting duration and double animation, the progress bar remains static. I see there's something to do with this double animation.</p>
  
  <pre><code>//Duration duration = new Duration(TimeSpan.FromSeconds(1));
  //DoubleAnimation doubleanimation = new DoubleAnimation(200.0, duration);
  myProgress.IsIndeterminate = true;
  //myProgress.BeginAnimation(ProgressBar.ValueProperty, doubleanimation);
  myProgress.Value = 10;
  myProgress.Value = 0;
  </code></pre>
  
  <p>How can I solve this DoubleAnimation issue? What am I missing here?</p>