title: WPF Data bound ProgressBar not showing progress
body: <p>I am having troubles with getting the ProgressBar working.</p>
  
  <p>XAML:</p>
  
  <pre><code>    &lt;ProgressBar x:Name="ProgressBar" Value="{Binding Progress, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="37" Margin="10,35,0,0" VerticalAlignment="Top" Width="590"/&gt;
  </code></pre>
  
  <p>Code behind:</p>
  
  <pre><code>    ProgressBar.DataContext = progressModel;
  </code></pre>
  
  <p>IProgressModel:</p>
  
  <pre><code>public interface IProgressModel
  {
      double Minimum { get; set; }
      double Maximum { get; set; }
      double Progress { get; }
  }
  </code></pre>
  
  <p>Implementation:</p>
  
  <pre><code>    private void WorkerOnDoWork(object sender, DoWorkEventArgs doWorkEventArgs)
      {
          Minimum = 0;
          Maximum = RenamableFiles.Count;
  
          var i = 0;
          foreach (var renamableFile in RenamableFiles)
          {
              var oldFilename = ReCreateOldFileName(renamableFile);
              var renameProposalFilename = CreateNewFileName(renamableFile);
  
              if (oldFilename != null &amp;&amp; renameProposalFilename != null &amp;&amp; !oldFilename.Equals(renameProposalFilename))
              {
                  // File.Move(oldFilename, renameProposalFilename);
                  Thread.Sleep(100);
                  Progress = i++;
              }
          }
      }
  </code></pre>
  
  <p>And the pretty straight forward PropertyChanged mechanism:</p>
  
  <pre><code>    private double _progress;
      public double Progress 
      {
          get { return _progress; }
          set 
          { 
              _progress = value;
              OnPropertyChanged();
          }
      }
  
      public event PropertyChangedEventHandler PropertyChanged;
  
      [NotifyPropertyChangedInvocator]
      protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
      {
          var handler = PropertyChanged;
          if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
      }
  </code></pre>
  
  <p>The ProgressBar starts "full" and remains that way throughout the process. I have read all related threads on SO, but no luck. </p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thx in advance.</p>