1
votes

I'm using MVVM Light on an SL4 app. I would like to set the selected items on a listbox after it is databound.

I have no problem when there is one item to set, but I do not know how do do this when I have to set multiple items in the list.

1
can you please provide the code you are using .Rhys

1 Answers

0
votes

Bind the IsSelected property of the ItemContainerStyle to a bool property on the view models that are bound to ItemsSource.

You can then just set that property to true or false to select or deselect the item in the listbox.