Hey guys.
I have two ComboBoxes both have exactly the same Items. My Problem ist that I want to select an item in the first ComboBox, which should be deleted in the second. But it doesn't work.
Die Events:
private void cb_StoneCoordinates1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
//cb_StoneCoordinates2.Items.RemoveAt(cb_StoneCoordinates1.Items.IndexOf(cb_StoneCoordinates1.SelectedItem));
cb_StoneCoordinates2.Items.RemoveAt(cb_StoneCoordinates1.SelectedIndex);
}
private void cb_StoneCoordinates2_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
//cb_StoneCoordinates1.Items.RemoveAt(cb_StoneCoordinates2.Items.IndexOf(cb_StoneCoordinates2.SelectedItem));
cb_StoneCoordinates1.Items.RemoveAt(cb_StoneCoordinates2.SelectedIndex);
}
Hier noch ein Bild meiner Andwendung, http://tempuri.org/tempuri.html
Wpf ComboBox Problem
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Raj KumarRank #25 · 44.2K reputationPosted May 29, 2013, 8:35 PM EDT
Dominik Hammersbach3 reputationPosted May 30, 2013, 4:12 AM EDT