Articles in this section
Category / Section

Zoom the Diagram based on the Focus Point

7 mins read

In diagram to resize the model, there are a number of options available. These options are differentiated by the type and constraint (enabling/disabling the “SizeToContent” property) which are listed in below.

 

Model’s LogicalSize property

 

Using the Model’s LogicalSize property, we can assign/resize the size of the model type as System.Drawing.SizeF. The following code illustrates how to resize the model.

 

[C#]

 

diagram1.Model.LogicalSize = new SizeF(500, 500);

 

[VB]

 

diagram1.Model.LogicalSize = new SizeF(500, 500)

 

Model’s DocumentSize property

 

This property is also used to assign/resize the size of the model type as Syncfusion.Windows.Forms.Diagram.PageSize. The following code illustrates how to resize the model.

 

[C#]

 

diagram1.Model.DocumentSize = new PageSize(500, 500);

 

[VB]

 

diagram1.Model.DocumentSize = new PageSize(500, 500)

 

Model’s MinimumSize Property

 

This property is used to set the minimum size of the Model under the type of System.Drawing.SizeF. But this property is used only when the Model’s SizeToContent property is enabled. Otherwise, it is not considered by the diagram. The following code illustrates to how to set minimum size value.

 

[C#]

 

diagram1.Model.MinimumSize = new SizeF(300, 300);

 

[VB]

 

diagram1.Model.MinimumSize = new SizeF(300, 300)

 

Conclusion

I hope you enjoyed learning about zoom the Diagram based on the Focus Point.

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)
Please  to leave a comment
Access denied
Access denied