I need to recreate a shared drop-down list selection where each item can be picked only by one control at a time. The closest example I can think of is player's color selection in games like Generals and Age of Empires (multiplayer).
For example, there is a list:
{"- None -", "Blue", "Red", "Yellow", etc.}
There are four ComboBoxes. Each of them starts as "- None -". If ComboBoxA takes "Blue", no other ComboBox should have "Blue" in their list. Though ComboBoxA still should have "Blue" in its List. If ComboBoxA picks another option, all other ComboBoxes should now have "Blue" again. The same with Red, Yellow, etc.
Any ideas on how to achieve this? MVVM is preferable but not a must.
Based on answers on my other question, partially the answer given by Herman and a lot of customization, I came to using a multiValue converter. Its convert method is as follows:
ObservableCollection<WorksheetColumn> worksheets = new ObservableCollection<WorksheetColumn>(values[0] as IEnumerable<WorksheetColumn>);
ComboBox combo = values[1] as ComboBox;
WorksheetColumn selected = combo.SelectedItem as WorksheetColumn;
int keepColumn = selected.ID;
return worksheets.Where(header => header.ID == 0 || header.Selected == false || header.ID == keepColumn);