This project is read-only.

Expand All Nodes WindowsAnalyzer TreeView

May 12, 2009 at 8:21 PM

Hello,

I'm developing an add-in to .Net Reflector and I need to expand all the nodes in the windowsAnalyzer TreeView  by code. I tried to do it recursively using the expand() method but when the recursion expands the second level stops there becouse (I think) the node Isn't properly loaded. My code is something like:

 

analyzerTreeView.AfterExpand += new TreeViewEventHandler(this.MethodDependencyAfterExpand);

private void MethodDependencyAfterExpand(object sender, TreeViewEventArgs e)
{
    foreach (TreeNode node in e.Node.Nodes)
   {
           node.Expand();
    }
}

 Can someone help me to make it work?

thanks!

Nico