getting selected checkbox items from listbox mvvm
I have listbox in开发者_JAVA技巧 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
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.
精彩评论