I'm trying to write a C# WPF application and I'm stuck with the TreeView and ObservableCollection.
This is my TreeView Items.
| Root
--- SubItem
------ SubItem
| Root
--- SubItem
------ SubItem
---------- SubItem
I'm modifyng this items from other window and I need to update this treeview without re-loading all items. I've made my search and I found ObservableCollection. But I can't understand how to use ObservableCollection and notify changes and update this list. Can you give me some sample code or help me with doing that?
Here is a good example to Implement
Simplifying the WPF TreeView by Using the ViewModel Pattern
.This is just another sample,
Your Model:
Your ViewModel:
In xaml:
Full code