title: Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead
body: <p>I am new in Binding and WPF recently I've learned how to create a <code>listBox</code> with multiple columns using Binding tech</p>
  
  <pre><code> &lt;ListView ItemsSource="{Binding Items}" Margin="306,70,22,17" MouseDoubleClick="listBoxSS_MouseDoubleClick" Name="listBoxSS" &gt;           
      &lt;ListView.View&gt;
              &lt;GridView&gt;
                  &lt;GridView.Columns&gt;
                      &lt;GridViewColumn Header="first_name " Width="100" DisplayMemberBinding="{Binding Path=First_name}" /&gt;
                      &lt;GridViewColumn Header="last_name" Width="100" DisplayMemberBinding="{Binding Path=Last_name}" /&gt;
                      &lt;GridViewColumn Header="phone_number" Width="100" DisplayMemberBinding="{Binding Path=Phones[0]}" /&gt;
                      &lt;GridViewColumn Header="notes" Width="100" DisplayMemberBinding="{Binding Path=Notes}" /&gt;
                  &lt;/GridView.Columns&gt;
              &lt;/GridView&gt;
          &lt;/ListView.View&gt;
      &lt;/ListView&gt;
  </code></pre>
  
  <p>and this is the code: </p>
  
  <pre><code>List&lt;Student&gt; arr = search.students();
          listBoxSS.ItemsSource = arr;
  </code></pre>
  
  <p>but the problem was when I tried to use add or remove item or clear    </p>
  
  <pre><code> listBoxSS.Items.Clear();
  </code></pre>
  
  <p>Please I need an example for using the items source or the way that I can ADD or Remove Item or Clear the list.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>&lt;ListView ItemsSource="{Binding Items}" Margin="306,70,22,17" MouseDoubleClick="listBoxSS_MouseDoubleClick" Name="listBoxSS" &gt;
      &lt;ListView.View&gt;
          &lt;GridView&gt;
              &lt;GridView.Columns&gt;
                  &lt;GridViewColumn Header="first_name " Width="100" DisplayMemberBinding="{Binding Path=First_name}" /&gt;
                  &lt;GridViewColumn Header="last_name" Width="100" DisplayMemberBinding="{Binding Path=Last_name}" /&gt;
                  &lt;GridViewColumn Header="phone_number" Width="100" DisplayMemberBinding="{Binding Path=Phones[0]}" /&gt;
                  &lt;GridViewColumn Header="notes" Width="100" DisplayMemberBinding="{Binding Path=Notes}" /&gt;
              &lt;/GridView.Columns&gt;
          &lt;/GridView&gt;
      &lt;/ListView.View&gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p>and here is the code: </p>
  
  <pre><code> ObservableCollection&lt;Employee&gt; Gemployees;
  var employees = new ObservableCollection&lt;Employee&gt;(search.employees());
  </code></pre>
  
  <p><code>search.employees()</code> get the list of all employees in my DB</p>
  
  <pre><code> listBoxPE.ItemsSource = employees;
          Gemployees = employees;
  </code></pre>
  
  <p>now I can perform all the methods on Gemployees</p>
  
  <pre><code> Gemployees.Remove((Student)listBoxSS.SelectedItem);
   Gemployees.Add((Student)listBoxSS.SelectedItem);
  </code></pre>
  
  <p>The <code>ListView</code> perform a refresh whenever I add or remove an Item from Gemployees!! Cool but still a little hard work on binding. Now I am doing an interface class to every ListView so I can put my stuff into it. It wont perform any flexibility in Adding Items. </p>