I dont think I got the message across
Ill just try to explain using some screenshots, perhaps this will help someone else in the future.
Ok, now I took some sample code from another topic of the forum:
private void DiagramView_DragDrop(object sender, DragEventArgs e)
{
// compute the correct xy coordinates for the new shape
Point ClientPoint = DiagramView.PointToClient(new Point(e.X, e.Y));
PointF DiagramPoint = DiagramView.ClientToDoc(ClientPoint);
My first issue:
In this case if I drop an object at the top left corner, the actual coordinates of the DiagramPoint.X and DiagramPoint.Y are -186,-68 and not 0,0.
If you take a look at the second screenshot (the workflow of the external application I try to load) the diagram at the topleft is 0,0.
So I would like to have the same diagram coords as the source diagram. Being: topleft coords at 0,0.
I also notice that the DiagramPoint.X and .Y values change depending on the actual position on the screen. So they are different if the window is maximized for example.
I am looking for an absolute 0,0 at the topleft corner.
My second issue:
If I scroll the diagram all the way to the right, and create a new ShapeNode at, lets say, 10,10, the node appears immediately in the current viewable area, and not all the way on the left.
Screenshots:
Mindfusion diagramming
Source diagram (external application)
As you can see in the image above, there is one node outside of the visible area. It is at X 1172. And the value of X is that number regardless of the node being inside of the visible area or not.
I hope this makes sense now.
Thanks,
Bas