You can samply convert the child control to TextBox. Try this: private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { System.Windows.Controls.TextBox tb = (System.Windows.Controls.TextBox)(elementHost1.Child); tb.Text = e.Node.Name; }