Hi,
In your case you should create a custom tool that overrides the behavior of the NMouseWheelScrollAndZoomTool. The following is a sample implementation:
public class NCustomScrollAndZoomTool : NMouseWheelScrollAndZoomTool
{
public NCustomScrollAndZoomTool()
{
this.Name = "Custom Scroll and Zoom Tool";
StartMouseEvent = MouseEvent.LeftButtonDown;
}
public override bool CanActivate()
{
if (base.CanActivate() == false)
return false;
return Control.ModifierKeys == Keys.Control;
}
}
When you want to use the tool you should add it to the drawing view controller’s collection of tools and enable it:
NCustomScrollAndZoomTool customTool = new NCustomScrollAndZoomTool();
view.Controller.Tools.Add(customTool);
view.Controller.Tools.EnableTools(new string[] { customTool.Name });
If you want to disable the standard mouse scroll and zoom tool, you can do so by using the following line of code:
view.Controller.Tools.DisableTools(new string[] { NDWFR.ToolMouseWheelScrollAndZoom });
Best Regards,
Nevron Support Team