views:

81

answers:

1

I have an object which has a property of type ObservableCollection<bool>. It is bound to a list of checkboxes on a form using TwoWay bindings. I would like to add a PropertyChanged notification to this so that if certain values are selected, some other ones get automatically deselected. Is there a way to do this?

The ObservableCollection.PropertyChanged event doesn't get triggered when a value in the collection gets changed and I'm using the MVVM design pattern.

+2  A: 

You would need to use your own class that implements the INotifyPropertyChanged interface. You won't be able to use bool, but you can have a single property in your class that is that bool that you want.

Russ
I was hoping to avoid something like that... oh well thank you
Rachel
The problem is that bool does not implement INotifyPropertyChanged.
Russ