I have a WPF listbox control that is declaratively bound to a textbox. The listbox s ItemsSource is an ObservableCollection that is built from an XML file. I can easily prevent duplicate entries in the listbox when a new item is added because I can check for it in the "Add" button s Click event handler.
However, when an existing item s value is changed in the textbox (which obviously shows the listbox s selected item) to one that already exists in the list I want to prevent this, but I don t know how.
I d appreciate help with this!