I have a ListView which I am constantly adding items in.
I am able to scroll while the items in the ListView were being added.
However, upon selecting an item in the ListView, I am unable to scroll while items are being added. For each ListView.Items.Add(Object) I call, I will revert to the focus of the item initially selected.
Clearing the SelectedItems and SelectedIndices, I am still able to continue scrolling down the ListView as I keep popping back to the originally selected item anytime an item is added.
Could anyone advise how to get past this problem?
Thank you.
Regards,
Michael
If you’re using WPF, are you using an
ObservableCollection? It sounds like the DataContext is being changed causing the ListView to reload. If you bind to anObservableCollectionyou may have more luck.