Redraw links


I use the DiagramLayout. I have three nodes: NodeA with two children: NodeB and NodeC. When I collapse the subtree of NodeA, move it, and expand NodeA again the links are visible again but the start-point of the link is not updated and the link does not start at NodeA anymore.

This is an example:

How can I force GoXam to update these links? I could use maybe PartManager.RemoveLinkForData and PartManager.AddLinkForData. But is there a nice way?

Btw: Is this by purpose?

Thanks for any help!


I assume you are just calling Node.ExpandTree(). Among other things, it will make all of the child nodes and links to those child nodes become Visible.

Did you want the subtree to move along with the parent node when the user drags the parent node?

If so, you should set DraggingTool.Inclusions=“SubTree”.
This is what the IncrementalTree sample does.

If not, then after you expand the tree node, you could call Part.InvalidateRelationships().

Thanks! Great!

I knew there must be a better way than delete and add a link.