Hi Slavcho,
To be honest, I doubt I'm doing it right at all. I would appreciate it if you could take a look at the test project, thanks! So, I created it based on one of the VirtualizingDiagram usage examples (Virtualization_ArrangeContainer_20230404.rar, attached).
The code is in the DoArrange() method of the VirtualizingDiagramEx control. If I understood it correctly, right after
container.Arrange(layout);
I'm iterating over the diagram links and copying the hidden diagram link's ControlPoints into the property of the data object (I assign them to the links ControlPoints in the LinkRealized handler).
The problem is that I also have to arrange the nodes. My guess is that it should be
layout.Arrange(this, GetNonContainerItems());
to exclude the container. Or Arrange the container items, like container.Arrange(). All this leads to the fact that the container loses its nodes.
The attached image (arrange_container.png) shows what I'm trying to get. So that links don't overlap nodes. And of course, it's desirable that this happens not by clicking a button, as in the example, but when loading data, adding a new node, etc. Obviously, it's not what I get.
Thanks,
Kostya