Hi John,
Thanks for using Syncfusion products.
We suggest you to use the Diagram’s ‘SizeChanged’ event, ‘FitDocument’ method and Diagram.View’s ‘ScrollVitualBounds’ method to achieve your requirement. Please refer the below code.
Here is the code snippet:
[C#]
//Size Changed event
diagram1.SizeChanged += new EventHandler(diagram1_SizeChanged);
void diagram1_SizeChanged(object sender, EventArgs e)
{
//Fit the document on control field.
diagram1.FitDocument();
this.diagram1.View.ScrollVirtualBounds = new RectangleF(0,0,0,0);
}
For your convenience, we have created a simple sample to achieve your requirement.
Please try the below sample and let us know if you have any queries.
Forum DiagramFitDocument-806842262.zipRegards,
Amsath Ali. M