Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VSX: Make a Hierarchynode Parent of a Filenode

$
0
0

Hello,

I have got a this Project Structure:

  1. ProjectNode
  2.       FileNode
  3.             Hierarchynode

The Hierarchynode is not in my Memory, its just to Order my Subnodes.

Now I want to add a new custom Filenode to the Hierarchynode. It is created with the NewItemDialog of my Project. I tried to override the CreateFileNode method but in this case the new Filenode is added directly to my Projectnode. Then I tried to "Reparent" the Filenode with the HierarchyNode (Parent Property). Is there anything I forgot?

public override FileNode CreateFileNode(ProjectElement item)
{
FileNode node = null;
node = new MyNode(this, item);
node.Parent = this.FindChild("NameOfTheParentNode");
}

class MyNode : FileNode
{
public MyNode(ProjectNode root, ProjectElement element)
            : base(root, element)
{...}
}
best regards!



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>