How to insert a child node in a TreeView Control in WPF?
Posted
by xarzu
on Stack Overflow
See other posts from Stack Overflow
or by xarzu
Published on 2010-05-15T03:55:48Z
Indexed on
2010/05/15
4:04 UTC
Read the original article
Hit count: 342
I have a TreeView control that I have created in XAML in a WPF program
After adding a couple nodes at the root level, I have written code that loops through the tree structure like so:
ItemCollection items = treeView1.Items;
foreach (TreeViewItem n in items)
{
...
}
Once I find the place in this loop where I want to include a child node, how do I go about inserting a child?
© Stack Overflow or respective owner