I have a listview (C#) with some items representing metadata objects. Near this listview I have a Panel where the structure of selected metadata object is shown.
When user selects one item I want to show my Panel (with structure of this item).
When user doesn't select any item or selects many items I want to hide my Panel.
It works but there are a lot of blinks during selection changes. I've prepared workaround to this issue by checking in SelectionChanged event whether the number of selected items changed (none -> one, one -> many, many -> one, one -> none). If
the number changed so I show or hide the panel, in other cases I don't do anything.
But one blink is still here. When I just move one-item selection from one item to another then SelectionChanged occures 2 times (for previous selected item and then for next selected item). So my check works incorrectly in this case: one item selection changes
to none selection (first SelectionChanged event) and panel becomes hidden, then none selection changes to one item selection (second SelectionChanged event) and panel becomes shown. So user sees blinks.
How can I detect whether user deselected all items at all or just moved the selection from one item to another.
Thanks a lot. Sorry for my English:)
View Complete Post