We are unable to understand your query. Can you please provide more information about your requirement. However, we can disable the Panning by disable the IsPanEnabled property of the diagram view. Please refer the below code snippet.
// Enable the Panning
diagramView.IsPanEnabled = true;
// Disable the Panning
diagramView.IsPanEnabled = false;
Please let us know if you have any concerns on this.
By default, the size of the diagram page is depending on the elements which are placed in the diagram page. So, when we move the element to outside of the diagram page’s bounds, the diagram page size will be changed based on that element.
For example, Consider a single Node is placed in the position of 250,250 and the size of that node is 100,100. Now, the size of the diagram page will be (Position of the Node + size of the Node) 350,350. If we move that node to the position of (500,500), the size of the diagram page also changed to (600,600). And also, if we move that node to the position of (100,100), the size of the diagram page is also changed to (200,200). For more information please refer the attached video (Video Name : BehaviourVideo) . In that video, the coloured area is diagram page.
In your scenario. when move the Node from outside of the diagrampage’s bounds to inside, the size of the diagram page is changed. So that we can see the behaviour like panning. This is not an issue. This is a current behaviour.
However, if you want to stop this behaviour, we are suggested you to please use the BoundaryConstraintsArea property of DiagramView. BoundaryConstraintsArea is used to define the diagram page size. Please refer the code snippet.
Code Snippet :
// Enable the BoundaryConstraintsEnabled property
diagramView.BoundaryConstraintsEnabled = true;
//Set value the BoundaryConstraintsArea
diagramView.BoundaryConstraintsArea = new Rect(0, 0, 1000, 600);
// Disable the SizeToContent property
diagramView.SizeToContent = false;
For more information about the BoundaryConstraintsArea, please refer our Syncfusion online documentation using the below link.
Note : We should enable the BoundaryConstraintsEnabled property of the diagram view and also we should disable the SizeToContent property of the diagram view, when we use the BoundaryConstraintsArea.
Please let us know if you require further assistance on this.