Cannot access the selected items collection when the ListView is in virtual mode?
问题 I have a ListView in Virtual Mode. I wanna to access SelectedItems property. But when I use ListView1.SelectedItems , I receive the following Exception : Cannot access the selected items collection when the ListView is in virtual mode How can I access to ListView1.SelectedItems in VirtualMode. 回答1: It is quite old post but maybe someone else will benefit. Simply use ListView.SelectedIndexCollection col = listView.SelectedIndices; Then you can access an item: forearch(var item in col) { string