title: IsSelected Binding in WPF DataGrid
body: <p>I have in my Model (Class X) Boolean property: <code>IsSelected</code>, is linked to a <code>WPF DataGrid</code> as follows:</p>
  
  <pre><code>&lt;DataGrid  SelectedIndex="{Binding SelectedXIndex,Mode=TwoWay}" 
             DataContext="{Binding MyViewModel}" 
             ItemsSource="{Binding ListX}" AutoGenerateColumns="False"&gt;
       &lt;DataGrid.RowStyle&gt;
           &lt;Style TargetType="{x:Type DataGridRow}"&gt;
               &lt;Setter Property="IsSelected" 
                       Value="{Binding IsSelected, Mode=TwoWay, 
                               UpdateSourceTrigger=PropertyChanged}"/&gt;
           &lt;/Style&gt;
       &lt;/DataGrid.RowStyle&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p><code>ListX</code>- ObservableCollection</p>
  
  <p><code>IsSelecte</code>- Call to NotifyPropertyChange </p>
  
  <p>It works great.</p>
  
  <p>But when I have a lot of rows, that I need to scroll to see them, and I press the button "Select All" that runs the following function, he chooses me only some of the rows and not all: (Even though all the IsSelected on the list is <strong>true</strong>)</p>
  
  <pre><code>public void SelectAll()
  {
      ListX.All(c =&gt; c.IsSelected = true);
  }
  </code></pre>
  
  <p>I can not understand why this is happening?</p>