title: Binding WPF Progress Bar never updating
body: <p>During the OnPropertyChanged(), the PropertyChanged event is always NULL so the event never gets called.  What am I missing?</p>
  
  <p>Here is the XML Code:</p>
  
  <pre><code>&lt;ProgressBar x:Name="ProgressBar1" Value="{Binding PBarValue, UpdateSourceTrigger=PropertyChanged}" Width="200" Height="20" Minimum="0" Maximum="100"&gt;&lt;/ProgressBar&gt;
  </code></pre>
  
  <p>C# Code:    </p>
  
  <pre><code>public PBar progress_bar = new PBar();
  
  public class PBar : INotifyPropertyChanged
  {
      private int _progress;
      public int progress
      {
          get { return _progress; }
          set
          {
              if (value != _progress)
              {
                  _progress = value;
                  OnPropertyChanged("PBarValue");
              }
          }
      }
  
      public event PropertyChangedEventHandler PropertyChanged;
  
      protected void OnPropertyChanged(string info)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(info));
          }
      }
  }
  
  private void Main_Initialized(object sender, EventArgs e)
  {
      ProgressBar1.DataContext = progress_bar;
      progress_bar.progress=75;  // This does call the set and
                                 // OnPropertyChanged but
                                 // PropertyChanged is always null
                                 // so it never updates UI
  }
  </code></pre>
  
  <p>I am setting the "value" of the Progress Bar from another thread so this is why I need the binding.</p>
  
  <p>I have tried this so many different ways at this point my head is spinning!</p>