{"id":4547,"date":"2014-03-30T13:27:52","date_gmt":"2014-03-30T13:27:52","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/mvvm-with-treeview-add-nodes-collection-of-common-programming-errors\/"},"modified":"2014-03-30T13:27:52","modified_gmt":"2014-03-30T13:27:52","slug":"mvvm-with-treeview-add-nodes-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/mvvm-with-treeview-add-nodes-collection-of-common-programming-errors\/","title":{"rendered":"MVVM with TreeView &#8211; add nodes-Collection of common programming errors"},"content":{"rendered":"<p>I am new to WPF, and I am trying to implement MVVM with TreeView according to an example. However, in addition to the functionality in the example I would like to be able to add nodes to the tree (i.e. add new child to a specific node in the tree during runtime).<\/p>\n<p>My question is, should the new nodes be added to (a) the model or to (b) the view-model?<\/p>\n<p>How changes to one of them effects the other?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am new to WPF, and I am trying to implement MVVM with TreeView according to an example. However, in addition to the functionality in the example I would like to be able to add nodes to the tree (i.e. add new child to a specific node in the tree during runtime). My question is, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4547","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4547"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4547\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}