tags:

views:

180

answers:

1

I have a listbox with images. I want to select and deselect all the images in that listbox at once. I am using radiobuttons for that. one radio button is for selecting all the images in listbox and another radio button is for deselecting all the images in listbox. Can any plz help.

Thanks in advance.

+1  A: 

I think you're after listBox.SelectAll(); and listBox.SelectedItems.Clear();

It's a different story if you're using data binding and don't actually reference your listBox in the code-behind, but from your question I assume you're not.

AndrewS
Thanks a lot.. I got the solution