I think the problem is that you do not inform the mainNode that child is its children, something like: mainNode.Children.Add(child) (in the for block). You just create the child node, but you don't do anything with it for it to have any relation with the TreeView or with the mainNode.