Is there a way to make a TreeView appear always fully expanded?

Do you want it to initially display expanded? If so, then call the ExpandAll method on the root node after you have added all of the tree nodes.

If you want it to display expanded and not allow the user to collapse it, then you need to handle the BeforeCollapsed event and cancel it. (Set e.Cancel = true;).


One way is to use TreeView.ExpandAll() like this:

private void myCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
   // If the check box is checked, expand all the tree nodes.
   if (myCheckBox.Checked == true)
   {
      myTreeView.ExpandAll();
   }
   else
   {
      myTreeView.CollapseAll();
   }
}