Hello everybody,
I've a litte problem with my ListBox and the databinding and hope somebody can help me:
When I change the value of one Combobox, all other boxes changes as well
<Page.Resources><CollectionViewSource x:Key="typen" /></Page.Resources><ListBox Name="list_positionen"><ListBox.ItemTemplate><DataTemplate><ComboBox DisplayMemberPath="name" SelectedValuePath="id" SelectedValue="{Binding Path=merkmaltyp}" ItemsSource="{Binding Source={StaticResource typen}}" /></DataTemplate></ListBox.ItemTemplate></ListBox>
code behind sets the source of "typen" and adds some items to the list:
var qry = from a in sql.tbl_typ orderby a.name select a; (this.FindResource("typen") as CollectionViewSource).Source = qry; foreach (tbl_list list in data.tbl_list { list_positionen.Items.Add(list); }
I need to change each listbox-item to different combobox values.
Big thanks!