title: WPF Binding with INotifyPropertyChanged does not update
body: <p>I appear to be having serious problems getting my WPF UI to update when I update when I update the property it is bound to. Here is my view model class definition:</p>
  
  <pre><code>namespace WpfModel
      {
          class AppModel : INotifyPropertyChanged
          {
              private int _count = 7;
  
          public int Count { get { return _count; } 
          set { _count = value;     OnPropertyChanged("Count"); } }
  
          public void Increment()
          {
              Count++;
          }
  
          public event PropertyChangedEventHandler PropertyChanged;
  
          private void OnPropertyChanged(string prop)
          {
              PropertyChangedEventHandler handler = this.PropertyChanged;
  
              if (handler != null)
              {
                  var e = new PropertyChangedEventArgs("prop");
                  handler(this, e);
              }
          }
      };
  }
  </code></pre>
  
  <p>This is bound to my simple UI in the following XAML:</p>
  
  <pre><code>&lt;Window x:Class="WpfModel.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:vm="clr-namespace:WpfModel"
          Title="WPF Data Model Demo" Height="128" Width="284" &gt;
  
      &lt;Window.DataContext&gt;
          &lt;vm:AppModel /&gt;
      &lt;/Window.DataContext&gt;
  
      &lt;Grid Height="Auto" Width="Auto"&gt;
          &lt;Button Margin="0,0,12,12" Name="IncButton" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75" Click="IncButton_Click" Content="Increment" /&gt;
          &lt;Label Content="Count Variable:" Height="28" HorizontalAlignment="Left" Margin="12,12,0,0" Name="label1" VerticalAlignment="Top" /&gt;
          &lt;Label Height="28" Margin="116,12,0,0" Name="CountLabel" VerticalAlignment="Top" HorizontalAlignment="Left" Width="40" Content="{Binding Path=Count}" /&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>The application is defined like follows:</p>
  
  <pre><code>namespace WpfModel
  {
      /// &lt;summary&gt;
      /// Interaction logic for MainWindow.xaml
      /// &lt;/summary&gt;
      public partial class MainWindow : Window
      {
          private AppModel _model = new AppModel();
  
          public MainWindow()
          {
              InitializeComponent();
  
              //_model = new AppModel();
          }
  
          private void IncButton_Click(object sender, RoutedEventArgs e)
          {
          }
      }
  }
  </code></pre>
  
  <p>When the app starts up, everything is peachy, the label even initially displays whatever value is in the Count property of the model. Calling increment updates the model properly, and directly incrementing the Count property as shown in the code also works just fine.</p>
  
  <p>The problem here, is that the PropertyChanged event handler never seems to get added to. I can step through the code in the debugger and see the value in the property updating, and I can see the call to OnPropertyChanged even, but the PropertyChanged handler itself is always null.</p>
  
  <p>Is there a problem with my binding maybe?</p>
  
  <p>I am using MSVC 2010 Express.</p>