I am figuring out a way to Select Multiple items in list view and deleting them on a certain action. What I can\'t figure out is, how should I have these multiple items selected
I would suggest do not use the SelectedItems
property of ListView
, instead bind the Selected
property of the single ListViewItem
, to a corresponding ViewModel
class. After this, the only thing you need to do is to find all ViewModel
object that have bound the Selected
property TRUE, remove them from model collection (if you do remove) and refresh UI. If the collection is ObservableCollection
, the UI will be refreshed automatically.
Good Luck.