How to unselect item in listbox?

1.4k views Asked by At

If I have a list box is it possible that when I click on item first time it will select it and if I click on it second time it will unselect?

If yes how can I do it?

1

There are 1 answers

0
Kolajo On

Naturally it is not possible to ordinarily click again to deselect, but their is a way around it. listen to the SelecttionChanged event of the listBox, always get the selectedindex, upon another select set selectedindex to -1