Links layer in GoSubGraph?

I used GoDocument LinksLayer property to put all the links below the nodes - CreateNewLayerBefore(Layers.Default).

The problem is that the links in the sub graphs are sometime drawn after the nodes.

I want the same behavior for sub graphs as for the main document: layers to be drawn below the nodes. How can this be done?

Thanks for your help.

If you are adding an IGoLink object to a GoSubGraph (or any other GoGroup, actually), you want to make sure it is drawn before (i.e. behind) the other children in the subgraph. Instead of calling GoGroup.Add(…), call GoGroup.InsertBefore(null, …).

There is also a posibility to move objects around something like MoveBefore(…)?

You can use the InsertBefore or InsertAfter methods for objects that already belong to the group–that will just change the order.

Perfect! Thanks