PanAndZoom not responding to events


https://www.nevron.com/Forum/Topic8466.aspx
Print Topic | Close Window

By Todd Lichtas - 10 Years Ago

I have implemented a pan and zoom control in my project and set the MasterView property to my view.  The behavior I am seeing is that the birds eye view is being displayed in the PanAndZoom control, but the ZoomIn, ZoomOut, ZoomSlider, and ViewportBand have no effect in changing the Zoom level.  I have looked at the PanAndZoom example in the VisualInterfaceComponents, and do not see any additional properties that need to be set.  I have attached a sample program that I created that shows this behavior.

Thanks,

Todd Lichtas

By Nevron Support - 10 Years Ago

Hi Todd,

The problem with your code is that you set the view layout to Fit, which means that the drawing document is aways zoomed in or out in order to fit/fill the whole area of the drawing view. In this case the proper zoom factor is automatically determined by Nevron Diagram for .NET and that is why the PanAndZoom control does not affect it. If you set the zoom factor to normal it should work fine:

NDrawingView1.ViewLayout = ViewLayout.Normal

By Todd Lichtas - 10 Years Ago

That did it.  Thanks...Todd