n Silverlight 3 the standard ListBox now has a SelectionMode property which is filled from an enumerated constant whose possible values are
When setting the SelectionMode Intellisense will display the potential values
Creating and using a multi-select list box requires only setting the property and retrieving the values. In the following example we create a multi-select list box, a button to indicate that our selection is complete, and a TextBlock to display the retrieved values,
Note the selection mode set on line 37.
We need an event handler for clicking the button, that will find all the selected items and stringify them for the Message TextBlock:
As an aside, not that using var for the type in line 19 allows the program to remain type safe without the programmer having to find the specific enumerable that the SelectedItems property will return. Sweet.