I have a ListView
class that uses the ItemSelectionChanged
event to maintain its own list of selected items.
This is working well, except that Clear()
doesn't seem to fire the ItemSelectionChanged
event.
This means that after Clear()
is called the list still contains all of the items that were highlighted prior to Clear()
being called.
I wanted to override the Clear()
method so that I could clear the list myself, but I can see that it's not marked as virtual. Is there another way that I can use the existing Clear()
method?
Plan B is that I just write my own method and call it right after clear, but that isn't as nice.
listView1.Clear();
listView1.ClearMyList();