Winform

TreeNode类型是有Expand和ExpandAll这两个方法。而Treeview是只有ExpandAll的,
想要展开根目录下面的节点的话

            //只展开根目录
            if (this.treeView1.Nodes.Count > 0) this.treeView1.Nodes[0].Expand();
原文地址:https://www.cnblogs.com/KTblog/p/4898366.html