tags:

views:

61

answers:

1

I have a treeview which is bound to an observablecollection via HierarchicalDataTemplate. I cant seem to find any treeview functionality that provides me notifications that at any level a new treeviewitem was added.

I know that i can bubble item addition notification to my model's root and raise property changes which can be handled, but I'm trying to find a way doing so by my view without adding this functionality to the model/view-model.

Thanks, Oren.

A: 

You are already using an Observable Collection, which notifies when the collection is changed - so hook into this event rather than into the treeview, which is also an observer of the same collection.

Sohnee
Thanks for the quick answer.The thing is that the ObservableCollection may recursively have child ObservableCollections - therefore i need to know whether at any level any of the collections was updated.
Oren