Wpf treeview binding not updating
Once I get that, Data Context of the Tree View Item of A is updated, but the Tree View Item itself is not. Items, it is empty and iteratation is unable to continue.How can I refresh the Tree Vuew & Tree View Item when its Items Source changes?I'm thinking WPF checks to see whether the collection reference has changed, or does the Items Source object have to be an Observable Collection`1 for this to work? What you were binding to was the property and Property Changed (from INotify Property Changed) was only being called when the property was being set e.g.I did make sure that the object sent a notification that the property Folder Entities had changed. Which surprises me as I'm telling the data binding engine that the property has changed, still no update is taking place.
when I iterate the treeview, first I find A, it matches first path of A. A11, so I send a web service request to get A's children.
My problem is that when I change the Folder Entities property the binding doesn't update.
If I change the Folder Name property the tree node that corresponds to that item will change, but the collection that is Folder Entities just wont. For the data binding engine to be notified of a change within a collection it need to bind to an Observable Collection.
My App has a Tab Control, Tree View is on one tabpage, the other tabpage has a datagrid, it has some data selected from treeview.
When right click an item in datagrid, I want to locate the item on treeview.The simplest way to invalidate the collection property and cause the converter code to run again would be to I think understand what your telling me to do, but I'm not sure how to do that with the hierarcical Data Template.