Silverlight treeviewitem not updating
I have read through the comments and suggestions above, but I can't see how any of the solutions can be used in my situation. However, I also have a Refresh option, which needs to clear the old items before loading refreshed ones, so I can't just remove the call.
It was mentioned that the On Property Changed event should be raised on the Children property in the setter for the children.
As described above, when the user elects to expand the node, the data loads on demand correctly, but the node remains unexpanded.
The user must attempt to expand the node for a second time to see the child nodes that were loaded on demand. Clear() then the node expands straight away as expected.
The only difference in your sample and my application is the amount of items in the observable collection.My Tree View is bound to an Observable Collection and uses Hierarchical Data Templates. Only when users click a node in tree, a web service call will be sent to get its child items.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 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.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.