C # UWP Windows 10 project
There are two ComboBox data sources of which are two ObservableCollection .
Both ComboBox bound to two variables in ViewModel in Mode=TwoWay . Klas ViewModel implements INotifyPropertyChanged .
The Dilem is that the set of values of these ComboBox 's should be mutually exclusive, that is, when choosing a value in the first one - the set of values in the second should change (a certain filter will overlap) and vice versa.
When you call ObservableCollection.Clear() and fill it with new data, respectively, INotifyPropertyChanged and INotifyCollectionChanged are repeatedly called, INotifyPropertyChanged stack to overflow (infinite loop).
Actually the question is - how to solve such a problem?