title: WPF ListBox ExtendedMode Move selected item with IsSelected binding
body: <p>Simple ListBox with <code>SelectionMode="Extended"</code> binds to viewmodels with <code>IsSelected</code> property:</p>
  
  <pre><code>&lt;TextBlock Text="{Binding SelectedItems.Count, ElementName=list}" /&gt;
  &lt;ListBox x:Name="list"
           SelectionMode="Extended"
           ItemsSource="{Binding listItems}"&gt;
      &lt;ListBox.ItemContainerStyle&gt;
          &lt;Style TargetType="{x:Type ListBoxItem}"&gt;    
              &lt;Setter Property="IsSelected"
                      Value="{Binding IsSelected}" /&gt;
          &lt;/Style&gt;
      &lt;/ListBox.ItemContainerStyle&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>When you select zero item and then do</p>
  
  <pre><code>listItems.Move(0, 1);
  </code></pre>
  
  <p>ListBox <code>SelectedItems.Count</code> increased from 1 to 2. After increasing that counter such way, it will decrement by one when you select random items in listbox.</p>
  
  <p>Why SelectedItems accumulates moved items and is there fix?</p>
  
  <p>ViewModels:</p>
  
  <pre><code>class MainVM : VMBase
  {
      public MainVM()
      {
          listItems = new ObservableCollection&lt;Item&gt;() { 
          new Item(),
          new Item(),
          };
      }
  
      public ObservableCollection&lt;Item&gt; listItems { get; set; }
  }
  
  public class Item : VMBase
  {
      private bool _isSelected;
      public bool IsSelected
      {
          get { return _isSelected; }
          set
          {
              if (_isSelected != value)
              {
                  _isSelected = value;
                  OnPropertyChanged("IsSelected");
              }
          }
      }
   }
  </code></pre>