I\'ve got a WPF app using the Model-View-ViewModel pattern.
In my ViewModel I\'ve got a ListCollectionView to keep a list of items.
This ListCollectionView is bound
Have a look over here http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html
The solution of Drew Marsh works very well, I recommend it. And I have another solution !
Model View ViewModel is a Passive View, you can also use a Presentation Model to access some datas of your presentation without being coupled with WPF (this pattern is used in the Stocktrader example of PRISM).
For me the best answer is to break a little the principle of MVVM.
On the code behind 1. Instanciate your viewModel 2. add an event handler SelectionChanged 3. iterate through your selected items and add each item to your list of the viewModel
ViewModel viewModel = new ViewModel();
viewModel.SelectedModules = new ObservableCollection<string>();
foreach (var selectedModule in listBox1.SelectedItems)
{
viewModel.SelectedModules.Add(selectedModule.ToString());
}