0
votes

I am using ListView with SelectionMod = Multiple, According to the client's requirement I am in a situation where I want to Deselect All items in listview except lastest selected,

if I change selection Mod programmatically to single, it deselects all items but the selected item is then the first one(that I selected first time) not the last.

1

1 Answers

0
votes

SelectionChanged event is fired every time you select or deselect one item in ListView. So you can keep this one in separate property, then deselect everything and set this one as selected.

Don't forget to check if item was selected and not deselected.