I have a thread safe implementation of the ObservableCollection that locks when adding, removing and firing the CollectionChanged event (in case a listener would like to iterate it).
Now I'm wondering, if a control (like ListView) that binds to this collection migth initiate an enumeration without recieving the CollectionChanged event, iterating it without locking it.
Is there a way to make sure this doesn't happen, or do I have to implement the IEnumerable interface myself, and return the enumerator of a copy of the collection in the GetEnumerator method.
Troels
Now I'm wondering, if a control (like ListView) that binds to this collection migth initiate an enumeration without recieving the CollectionChanged event, iterating it without locking it.
Is there a way to make sure this doesn't happen, or do I have to implement the IEnumerable interface myself, and return the enumerator of a copy of the collection in the GetEnumerator method.
Troels