Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

how to Add TreeViewItems into temporary TreeView in wpf?

$
0
0

Hi folks,

             I have a TreeView with 3 Items in my User Interface.

I want to Add One more TreeViewItem in the TreeView as First item.

so my logic is just Adding all 3 Items to one Temporary TreeView , then clear all items in my treeview, then Add my new Item then Add all 3 items from Temporary treeview.

is that logic good?

Problem is i am not able to Add these 3 Items into Temporary TreeView.

I am getting error like"Element already has a logical parent. It must be detached from the old parent before it is attached to a new one."

any one have idea?



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>