Listbox selectionmode=Extended binding to a datatable. Need to get selected items on button click using MVVM light
I have a listbox
<ListBox x:Name="lbFamilies" Margin="41,45,38.25,111" ToolTip="Select the tables to seed" ItemsSource="{Binding ManTntFmly.FmlyList}" ItemTem开发者_开发知识库plate="{StaticResource listBoxTemplate}" SelectionMode="Extended"/>
The FmlyList is a Datatable which is bound using DataBinding.
I need to find out all the items which have been selected from the listbox. How do I do that using the view model?
Additionally, how do I get key's to be passed instead of the values during the selection?
Here's a link to a post which should answer your question:Multi Select Listbox
精彩评论