Zoom and bring symbol into view

Is is possible to zoom into a specific symbol on a diagram. I need to do this on an event so must be done in code rather than the zoom tool.

1 Reply

J. J.Nagarajan Syncfusion Team May 2, 2007 06:23 PM UTC

Hi Robin,

If you want to zoom a symbol in a click event then you can use the symbol's Bounds property. Please refer to the following code snippet

int zoomIncrement=25;
private void button1_Click(object sender, System.EventArgs e)
{
if(this.diagram1.Controller.SelectionList.Count>0 && symbol1!=null)
{
symbol1.Bounds=new RectangleF(symbol1.X,symbol1.Y,symbol1.Width+zoomIncrement,symbol1.Height+zoomIncrement);
zoomIncrement=zoomIncrement+25;
this.diagram1.Controller.UpdateAllViews();
}
}

I have attached the sample for your reference. You can download the sample from the following page.

http://websamples.syncfusion.com/samples/Diagram.Windows/F60304/main.htm

Please refer to the sample and let me know if you have any questions.

Thanks,
Nagaraj

Loader.
Up arrow icon