I have a listbox where the items contain checkBoxes:
I want to get string Content for every CheckBox that user selected
<ListBox Name="SendCodecsNamelistBox"
Height="52"
Margin="150,128,31,65"
ItemsSource="{Binding .}">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Path=.}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
You can define a model like this
and bind it to the checkbox
Then you can get what you want like this