That’s what we want. So we save our diagram and we close our application. But when we want that diagram again, we re-open our diagram and that’s how it looks :
The bigger rectangle represents the diagram boundaries. As you can see, the link between these two nodes is “cut” by the diagram left boundary.
Is there a way to consider these links when we load the saved diagram ?
You might want to save the Diagram.Panel.Position along with your model, and then restore that property in a Diagram.InitialLayoutCompleted event handler.
Thanks for the answer. I can update now the position of the panel with this event.
But there is something annoying me. For example :
This code will work well and the diagram will be updated :
position = new Point(500, 500);
MyDiagram.Panel.Position = position;
But THIS code won’t update the layout :
position = new Point(-500, -500);
MyDiagram.Panel.Position = position;
Perhaps because (-500,-500) is beyond the diagram bounds (Diagram.Panel.DiagramBounds, as opposed to the Diagram.Panel.ViewportBounds), so it can’t scroll there?