We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Re-center and/or zoom a model within Diagram

Thread ID:





74162 Jun 2,2008 02:30 PM UTC Jun 6,2008 06:46 AM UTC WinForms 5
Tags: Diagram
Mark Attridge
Asked On June 2, 2008 02:30 PM UTC

I am using version 6.2 of the Diagram control in VB (Windows Forms version).

How can I automatically center a model within a diagram, so it is visible on-screen. Also, I would like to be able to auto-zoom so my entire model is visible at a glance (so I don't need to scroll to view other parts of the model).


Administrator [Syncfusion]
Replied On June 2, 2008 05:13 PM UTC

Hi Mark,

Are you looking for Diagram.View.FitDocument method ?


Mark Attridge
Replied On June 2, 2008 05:39 PM UTC

Thanks for the help, but this isn't quite what I'm looking for.

I don't need to resize the boundaries of the document/model, I simply need to ensure the model is centered and an appropriate zoom value is applied.

My guess I will have to do this programmatically in some way. However, since I am new to using this Diagram control, I was hoping there was some built-in functionality to handle portions of my request.

J.Nagarajan [Syncfusion]
Replied On June 3, 2008 12:38 PM UTC

Hi Mark ,

How can I automatically center a model within a diagram:

Could you please provide some more details regarding your requirement. Do you want to bring a node outside of the view to the center of the diagram?

You can use Magnification property of diagram view to zoom values on a scale.

Me.diagram1.View.Magnification = 150F

Please let me know if you have any questions.


Mark Attridge
Replied On June 5, 2008 02:22 PM UTC

I would like to bring a specific node in the diagram into view programmatically. I'm looking for a similar feature as is found in the TreeViewAdv control within the TreeNodeAdv class "BringIntoView".

Administrator [Syncfusion]
Replied On June 6, 2008 06:46 AM UTC

Hi Mark ,

You can change the origin of the view according to the location of the nodes in non viewable area in the diagram model. Please refer to the attached sample that demonstrates this completely. In this sample when you checkout the "ViewNode" checkbox, the diagram will automatically scroll down and you can see the Rectangle.


Please refer to it and let me know if this helps.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon