title: WPF DataGrid ItemsSource doesn't get updated on changing source
body: <p>I have already read some posts, but no one helped me with my problem.
  So, i have a View with a Viewmodel and inside the View a DataGrid boudn to a ObservableCollection inside the viewmodel.
  The Selected Item is also Bound to Type T == ObservableCollection</p>
  
  <pre><code>public ObservableCollection&lt;TableProperty&gt; TableProperties
      {
          get
          {
              return tableProperties;
          }
          set
          {
              if (tableProperties != value)
              {
                  tableProperties = value;
                  OnPropertyChanged("TableProperties");
              }
          }
      }
  
  public TableProperty Property
      {
          get
          {
              return property;
          }
          set
          {
              property = value;
              OnPropertyChanged("Property");
          }
      }
  </code></pre>
  
  <p>And here the DataGrid:</p>
  
  <pre><code>&lt;toolkit:DataGrid AutoGenerateColumns="False" 
                        UseLayoutRounding="True" 
                        ItemsSource="{Binding Path=TableProperties,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,NotifyOnTargetUpdated=True}"
                        SelectedItem="{Binding Path=Property,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" 
                        [...]&gt;
          &lt;toolkit:DataGrid.Columns&gt;
  </code></pre>
  
  <p>Now i want to implement a logic that changing a checkbox triggers a command setting some values of the selected item:</p>
  
  <pre><code>&lt;toolkit:DataGridTemplateColumn Header="Mandatory" IsReadOnly="False"&gt;
                  &lt;toolkit:DataGridTemplateColumn.CellTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Center"&gt;
                              &lt;CheckBox IsChecked="{Binding Path=Mandatory,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"&gt;
                                  &lt;CheckBox.Style&gt;
                                      &lt;Style TargetType="{x:Type CheckBox}"&gt;
                                          &lt;Style.Triggers&gt;
                                              &lt;DataTrigger Binding="{Binding Path=MandatoryDB}" Value="True"&gt;
                                                  &lt;Setter Property="IsEnabled" Value="False" /&gt;
                                              &lt;/DataTrigger&gt;
                                              &lt;DataTrigger Binding="{Binding Path=MandatoryDB}" Value="False"&gt;
                                                  &lt;Setter Property="IsEnabled" Value="True" /&gt;
                                              &lt;/DataTrigger&gt;
                                          &lt;/Style.Triggers&gt;
                                      &lt;/Style&gt;
                                  &lt;/CheckBox.Style&gt;
                                  &lt;i:Interaction.Triggers&gt;
                                      &lt;i:EventTrigger EventName="Checked"&gt;
                                          &lt;cmd:EventToCommand Command="{Binding Path=DataContext.SetMandatory, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" /&gt;
                                      &lt;/i:EventTrigger&gt;
                                  &lt;/i:Interaction.Triggers&gt;
                              &lt;/CheckBox&gt;
                          &lt;/StackPanel&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/toolkit:DataGridTemplateColumn.CellTemplate&gt;
              &lt;/toolkit:DataGridTemplateColumn&gt;
  </code></pre>
  
  <p>And this is the Command behind it:</p>
  
  <pre><code> private void OnSetMandatory()
      {
          property.Visible = true;
          property.ReadOnly = false;
          property.VisibleInGrid = true;
          property.UIPropertyName = DateTime.Now.TimeOfDay.ToString();
          OnPropertyChanged("Property");
          OnPropertyChanged("TableProperties");
      }
  </code></pre>
  
  <p>The Problem is: when I change the properties the item inside the collection has also been updated and it goes properly inside the Property Getter...
  <strong>If I call Datagrid.Items.Refresh()</strong> inside the view directly it will also display the values correctly, but not automatically from updating the collection.</p>
  
  <p>So do you have any idea? :)</p>