title: CheckBox not Updating when Source Changed
body: <p>I'm still very new to WPF/XAML so bear with me here...</p>
  
  <p>I have a DataGrid that contains three columns: 2 DataGridTextColumns and a DataGridTemplateColumn, which contains a CheckBox. The DataGrid is bound to a collection that displays objects of type Field. The IsChecked property of the CheckBox is also bound to a property in a ViewModel.</p>
  
  <p>What I'd like to be able to achieve is that when a Field i.e. a row in the DataGrid is clicked, the Field's corresponding CheckBox becomes checked or unchecked.</p>
  
  <p>I have bound to the SelectedItem of the DataGrid and can retrieve the Field that's clicked. I then set the "IsChecked" property of the Field accordingly.</p>
  
  <p>However, the check in the CheckBox does not appear (or disappear) seemingly until the row in the DataGrid is repainted. That is, if I scroll down so that the row disappears out of view and then scroll back up to it, the check is displayed in the CheckBox. I am raising an INotifyPropertyChanged event when the IsChecked property value is set.</p>
  
  <p>Would anyone be able to suggest what might be going wrong here?</p>
  
  <p>The code for the column containing the CheckBox is shown below.</p>
  
  <p>Any ideas/suggestions/help would be greatly appreciated.</p>
  
  <p>Many thanks.</p>
  
  <pre><code>&lt;DataGridTemplateColumn&gt;
      &lt;DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGridTemplateColumn&gt;
  &lt;/DataGridTemplateColumn&gt;
  </code></pre>