-
March 19th, 2009, 05:30 AM
#1
Make a copy of a treeviewitem without parent
In my application I have a TreeView with a number of TreeViewItems. The TreeView is shown in a Grid.
What I want to do is add a selected TreeViewItem to another Grid or TreeView without removing them from the original TreeView. Making a copy of the original TreeViewItem however also includes its parent (all relevant items will have a TreeViewItem as parent).
TreeViewItem tmp = tvItem;
(tmp.Parent as TreeViewItem).Remove(tmp); -> This line will remove the tvItem from the TreeView.
Does anybody know a way to do this?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|