title: How to support ListBox SelectedItems binding with MVVM in a navigable application
body: <p>I am making a WPF application that is navigable via custom "Next" and "Back" buttons and commands (i.e. not using a <code>NavigationWindow</code>). On one screen, I have a <code>ListBox</code> that has to support multiple selections (using the <code>Extended</code> mode). I have a view model for this screen and store the selected items as a property, since they need to be maintained.</p>
  
  <p>However, I am aware that the <code>SelectedItems</code> property of a <code>ListBox</code> is read-only. I have been trying to work around the issue using <a href="http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html" rel="noreferrer">this solution here</a>, but I have not been able to adopt it into my implementation. I found that I can't differentiate between when one or more elements are deselected and when I navigate between screens (<code>NotifyCollectionChangedAction.Remove</code> is raised in both cases, since technically all the selected items are deselected when navigating away from the screen). My navigation commands are located in a separate view model which manages the view models for each screen, so I can't put any implementation related to the view model with the <code>ListBox</code> in there.</p>
  
  <p>I have found several other less elegant solutions, but none of these seem to enforce a two-way binding between the view model and the view.</p>
  
  <p>Any help would be greatly appreciated. I can provide some of my source code if it would help to understand my problem.</p>