views:

58

answers:

1

Hi

I have listbox in which I am dynamically showing the pre selected checkboxes from the database. Now I want to loop through it to get the selected items/values. I am using mvvm light wpf.

kindly Suggest?

Thanks

A: 

If you are using MVVM, then you should have the 'IsChecked' value of the checkboxes bound to some property in your view model. That property should be accessible through code and you just need to loop over the items in your model collection.

More information about your specific ViewModel would be useful.

Steve Mitcham