Articles in this section

Bring the nodes into the view without scrolling the diagram

In diagram control, we have built-in support to bring the node into view without scrolling the diagram. The following methods are used to bring the nodes into view without scrolling the diagram.

BringToView:

The Syncfusion.Windows.Forms.Diagram.Controller’s "BringToView()" method is used to bring the given bounding rectangle area into view in the diagram. Here, we need to pass the bounds area as a parameter.

[C#]

diagram1.Controller.BringToView(diagram1.View.SelectionList[0].BoundingRectangle);

 

[VB]

diagram1.Controller.BringToView(diagram1.View.SelectionList(0).BoundingRectangle)

 

BringToCenter:

The Syncfusion.Windows.Forms.Diagram.Controller’s "BringToCenter()" method is used to bring the given bounding rectangle area to the center of the diagram’s view. Here, we need to send the needed bounds area as a parameter. Please refer to the code example below.

[C#]

diagram1.Controller.BringToCenter(diagram1.View.SelectionList[0].BoundingRectangle);

 

[VB]

diagram1.Controller.BringToCenter(diagram1.View.SelectionList(0).BoundingRectangle)

 

ScrollToNode:

Also we can bring the particular/selected node into the view without scrolling the diagram by using Syncfusion.Windows.Forms.Diagram.View’s “ScrollToNode()”  method. Please refer to the below code example. 

[C#]

diagram1.View.ScrollToNode (diagram1.View.SelectionList[0]);

 

[VB]

diagram1.View.ScrollToNode (diagram1.View.SelectionList(0))

 

Conclusion

I hope you enjoyed learning to Bring the nodes into the view without scrolling the diagram.

You can refer to WinForms Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinForms Diagram example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusio, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied