I need bind some ComboBoxes to one ObservableCollection.
I have this ListView
.
<ListView x:Name="lwCoefTables" Grid.Column="1" ItemsSource="{Binding Source={StaticResource CollectionCoefContainers}}">
<ListView.ItemTemplate>
<DataTemplate>
<ComboBox x:Name="cmbCoefTableTypes" ItemsSource="{Binding Source={StaticResource CollectionCoefLinksTable}}"
SelectedItem="{Binding CoefLinksTableType, Mode=TwoWay}" Grid.Column="1" VerticalAlignment="Center"
HorizontalAlignment="Left" Width="180" DisplayMemberPath="Name">
</ComboBox>
</DataTemplate>
</ListView.ItemTemplate>
I want bind my collection to all ComboBoxes and save selected items for each ComboBox. If I fill one collection and bind it to all comboboxes in TwoWay mode I get this:
I think I need helper class that will contain some similar collections. How to do that?