Do properties on an object within an Observable collection require a PropertyChangedEvent? For example:
public class MyObject
{
public int MyProperty { get; set;}
}
public class MyViewModel
{
ObservableCollection<MyObject> MyObjects = new ObservableCollection<MyObject>();
}
From what I can tell, if I execute MyObjects[0].MyProperty = 1;then my binding doesn’t occur. However, if I call MyObjects.Add(new MyObject()); the binding does occur.
In the first line, MyProperty exists on the first object in the collection MyObjects and not on the collection itself. So the MyObject class would need to implement INotifyPropertyChanged if you expect WPF to listen to changes of that property of the MyObject instance.