In case the list view selection mode allows multiple selection and you need to have a way to bind SelectedItems to your view model, you will find that SelectedItems is readonly and not bindable. Below is one of the workaround using System.Windows.Interactivity and Microsoft.Expression.Interactions. If you need these, it can be download from here
Additional namespace declaration in XAML
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
XAML:
<ListView Name="JobTesList" ItemsSource="{Binding JobsTest}" DisplayMemberPath="Name" Grid.Column="0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<ei:ChangePropertyAction TargetObject="{Binding Mode=OneWay}" PropertyName="SelectedItems" Value="{Binding Path=SelectedItems, ElementName=JobTesList}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</ListView>
<ListView ItemsSource="{Binding SelectedItems}" DisplayMemberPath="Name" Grid.Column="1"/>
View Model:
public class JobViewModel
{
public ObservableCollection<JobViewModel> JobsTest { get; set; }
public ObservableCollection<JobViewModel> SelectedJobs { get; set; }
public JobViewModel() {
JobsTest = new ObservableCollection<JobViewModel>();
SelectedJobs = new ObservableCollection<JobViewModel>();
}
public string Name {
get;
set;
}
public System.Collections.IList SelectedItems {
get {
return SelectedJobs;
}
set {
SelectedJobs.Clear();
foreach (JobViewModel model in value) {
SelectedJobs.Add(model);
}
}
}
}
In example above, your ViewModel will pick up the selected items whenever the selection on ListView changed.