I have a ListBox which is made up of Grid Items in Multiple SelectionMode in Silverlight 3.0.
When I use ListBox.SelectedIndex it only returns the first item which is selected.
I would like to be able see all of the selected items such that it would return all of the selected item indexes' such as; 2, 5, and 7, etc.
Any help?
Cheers,
Turtlepower.
You can find the selected indexes by iterating through
SelectedItems
and finding the objects in theItems
property, like this:Or if you prefer linq: