We have a problem updating the text for a TreeViewItem when the underlying datasource changes.
Here is our xaml (a bit simplified, removed unrelevant code like the "SystemTemplate"):
‘Parents’ is a property of the type ObservableCollection<Parent> in the class the DataContext is bound to, and Child is an ObervableCollection<Child> property in the Parent class.
The user can change the Name property of a Child object (not directly in the TreeView, but another place in the application), thus we need to update the TreeView to show these changes.
We’ve tried to just fire the propertyChanged like this, but nothing happens (although it works when we add a new Child):
propertyChanged(this, new PropertyChangedEventArgs(“Parents”));