I am new to MVVM and WPF. I did some research and read an article by Josh Smith about MVVM and this , and this .
I think I have no problem creating a treeview in WPF. The point is in my application, the left panel is a tree structure, on the right panel some properties of the selected node tree will be displayed, which the user can click on the button to edit the properties and save them in the data source (and potentially affect the treeview element). In addition, the user will be able to add / remove a child element node / grandchild node.
I can not find any article / example to implement this using MVVM.
Currently, I think that in the view models for the child node and grandchild node, I will add a public property that points to Usercontrol. The right panel will attach the selected Usercontrol element to the tree. The fact is that when a user adds a node / grand child node child, the right panel will be used so that the user can fill in the information and save it. I am not sure if this will affect the binding.
And other problems, such as editing the properties of a node tree, mean copying all the child node information from node to a new node and removing the old node from the tree and adding the new node to the tree?
Can someone point me to any good articles about such an implementation or give an approximate idea of ββthe problem that I should take note of etc.
Thank you very much. Angela
source share