title: WPF Progress Bar Animation Speed
body: <p>I've noticed that there is a difference in the time it takes for a WPF Progress Bar and a WinForms Progress Bar to fill completely.</p>
  
  <p>Fill completely as in set the Value to 100 in both Forms and WPF, one can notice that WinForms fills the bar smoothly whereas the WPF fills it instantly.</p>
  
  <p>I wanted to know if there is a property that we can edit in the templates to change that.</p>
  
  <p>Hope I made it clear, I can post a video too if anyone wants.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><a href="http://www.twitvid.com/DSGWZ" rel="nofollow"><em>Here's a video</em></a> of what I'm talking about, notice the difference ?</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>Filling the progress bar with a timer ?</p>
  
  <pre><code>using System;
  using System.Windows;
  using System.Windows.Controls;
  using System.Windows.Media.Animation;
  
  namespace WpfApplication2
  {
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              this.InitializeComponent();
              this.Title = "WPF Progress Bar Demo";
          }
  
          private void fill(int from, int to)
          {
              Duration duration = new Duration(TimeSpan.FromSeconds(0.5));
              DoubleAnimation doubleanimation = new DoubleAnimation(from, to, duration);
              progb.BeginAnimation(ProgressBar.ValueProperty, doubleanimation);
          }
  
          private void fill_Click(object sender, RoutedEventArgs e)
          {
              fill(0, 100);
          }
      }
  }
  </code></pre>
  
  <p>Is that OK and will it work anywhere ?</p>
  
  <p>Feel free to change it.</p>
  
  <p>Thanks.</p>