menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ZoomTool - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ZoomTool

    Interactive tool for zooming in and out of a Diagram's view is based on the center, top-left, and pointer position using Ctrl + mouse wheel.

    Inheritance
    System.Object
    Tool
    UITool
    ZoomTool
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Tool.Abort()
    Tool.ActionCursor
    Tool.ActivateTool()
    Tool.AppendParentTransformations(PointF, Node)
    Tool.ApplyDecorator(Decorator, Decorator)
    Tool.CanAddNode(Rectangle)
    Tool.CanInsert(Node)
    Tool.CanRender
    Tool.CheckBoundaryConstraints(Node, Matrix)
    Tool.CheckConnectionCenterPort(PointF)
    Tool.CheckConnectionPossibility(PointF)
    Tool.Controller
    Tool.CurrentCursor
    Tool.CurrentPoint
    Tool.CurrentToolCursor
    Tool.DeactivateTool()
    Tool.DrawFrameAroundPort(Graphics, ConnectionPoint)
    Tool.DrawRenderHelper(Node, Graphics)
    Tool.DrawRenderHelper(Node, Graphics, Rectangle)
    Tool.GetCurrentPoint(Boolean)
    Tool.GetEndPointLocation(ConnectionPoint, PointF)
    Tool.GetFrameRectangle(Boolean)
    Tool.GetFullRotationAngle(Node)
    Tool.GetInsideNodeAt(PointF)
    Tool.GetLocalPoint(Node, PointF)
    Tool.GetNodeUnderEndPoint(PointF)
    Tool.GetOriginOffset()
    Tool.GetPointOffset(PointF, Node)
    Tool.GetPortBounds(ConnectionPoint, Single)
    Tool.GetSelectionList()
    Tool.GetSnapCurrentPoint()
    Tool.GetSnapStartPoint()
    Tool.GetStartPoint(Boolean)
    Tool.HighlightCenterPortContainer(Graphics, ConnectionPoint)
    Tool.InAction
    Tool.m_ConnectorSourceEventArgs
    Tool.m_ConnectorTargetEventArgs
    Tool.m_ptStartOrigin
    Tool.m_rulerDisplayRect
    Tool.m_toolPreceding
    Tool.MakeControlNodeSnapshot(ControlNode)
    Tool.Name
    Tool.OnConnectorChanging(EndPointChangingEventArgs)
    Tool.OnOriginChanged(ViewOriginEventArgs)
    Tool.OutlineConnectionPoint(Graphics, ConnectionPoint)
    Tool.PrecedingTool
    Tool.ProcessClick()
    Tool.ProcessDoubleClick(MouseEventArgs)
    Tool.ProcessKeyPress(KeyPressEventArgs)
    Tool.ProcessKeyUp(KeyEventArgs)
    Tool.QuiteBoundarySet(Boolean)
    Tool.QuiteBridgingSet(Boolean)
    Tool.RulerHeight
    Tool.SingleActionTool
    Tool.SmartSnap(PointF, SizeF)
    Tool.SnapToPort(PointF, SizeF)
    Tool.SnapToPort(PointF, SizeF, Node)
    Tool.StartPoint
    Tool.ToolCursor
    Tool.ToolWorkRect
    Tool.UpdateConnnectorChangeEvent(IEndPointContainer, ConnectionPoint, ConnectionPoint)
    Tool.UpdateCursor(Boolean)
    Tool.UpdatePortRefreshRect(ConnectionPoint, Rectangle)
    Tool.WorkRect
    Tool.WorkRectPrev
    UITool.CanActivateControlPointMoveTools(PointF)
    UITool.CanActivateEndPointMoveTools(PointF)
    UITool.CanActivateLineSegmentTool(PathNode, PointF)
    UITool.CanActivateMoveTool(PointF)
    UITool.CanActivatePinMoveTool(Point)
    UITool.CanActivatePinMoveTool(PointF)
    UITool.CanActivateResizeTool(Point)
    UITool.CanActivateResizeTool(PointF)
    UITool.CanActivateRotateTool(Point)
    UITool.CanActivateRotateTool(PointF)
    UITool.CanActivateSegmentRelatingTools(Point)
    UITool.CanActivateSegmentRelatingTools(PointF)
    UITool.CanActivateVertexDeleteCommand(PathNode)
    UITool.CanActivateVertexInsertCommand(PathNode, PointF)
    UITool.CanActivateVertexMoveTool(PathNode, PointF)
    UITool.CanActivateVertexRelatingTools(Point)
    UITool.CanActivateVertexRelatingTools(PointF)
    UITool.Check(Point)
    UITool.Check(PointF)
    UITool.Dispose()
    UITool.GetCursor(BoxPosition, Node)
    UITool.IsVertexEditMode(Node)
    UITool.PerformHandleMove(MouseEventArgs)
    UITool.PerformLineSegmentMove(MouseEventArgs)
    UITool.PerformMove(MouseEventArgs)
    UITool.PerformPinMove(MouseEventArgs)
    UITool.PerformResize(MouseEventArgs)
    UITool.PerformRotate(MouseEventArgs)
    UITool.PerformVertexMove(MouseEventArgs)
    UITool.ToolToActivate
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Windows.dll
    Syntax
    public class ZoomTool : UITool, IDisposable
    Remarks

    Left click increases magnification by 25%. Right click decreases magnification by 25%.

    Tool Magnification

    Constructors

    ZoomTool(DiagramController)

    Initializes a new instance of the ZoomTool class.

    Declaration
    public ZoomTool(DiagramController controller)
    Parameters
    Type Name Description
    DiagramController controller

    The controller.

    Properties

    MaximumMagnification

    Gets or sets maximum magnification value the tool will zoom to.

    Declaration
    public int MaximumMagnification { get; set; }
    Property Value
    Type
    System.Int32

    MinimumMagnification

    Gets or sets minimum magnification value the tool will zoom to.

    Declaration
    public int MinimumMagnification { get; set; }
    Property Value
    Type
    System.Int32

    ZoomIncrement

    Gets or sets the amount to zoom each time the mouse is clicked.

    Declaration
    public int ZoomIncrement { get; set; }
    Property Value
    Type
    System.Int32

    Methods

    Draw(Graphics)

    Draws the specified graphics.

    Declaration
    public override void Draw(Graphics gfx)
    Parameters
    Type Name Description
    System.Drawing.Graphics gfx

    Graphics to draw on.

    Overrides
    Tool.Draw(Graphics)

    ProcessKeyDown(KeyEventArgs)

    Processes the key down.

    Declaration
    public override Tool ProcessKeyDown(KeyEventArgs evtArgs)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs evtArgs

    The System.Windows.Forms.KeyEventArgs instance containing the event data.

    Returns
    Type Description
    Tool

    The tool.

    Overrides
    Tool.ProcessKeyDown(KeyEventArgs)

    ProcessMouseDown(MouseEventArgs)

    Processes the mouse down.

    Declaration
    public override Tool ProcessMouseDown(MouseEventArgs evtArgs)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs evtArgs

    The System.Windows.Forms.MouseEventArgs instance containing the event data.

    Returns
    Type Description
    Tool

    The tool.

    Overrides
    UITool.ProcessMouseDown(MouseEventArgs)

    ProcessMouseMove(MouseEventArgs)

    Processes the mouse move.

    Declaration
    public override Tool ProcessMouseMove(MouseEventArgs evtArgs)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs evtArgs

    The System.Windows.Forms.MouseEventArgs instance containing the event data.

    Returns
    Type Description
    Tool

    The tool.

    Overrides
    UITool.ProcessMouseMove(MouseEventArgs)

    ProcessMouseUp(MouseEventArgs)

    Processes the mouse up.

    Declaration
    public override Tool ProcessMouseUp(MouseEventArgs evtArgs)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs evtArgs

    The System.Windows.Forms.MouseEventArgs instance containing the event data.

    Returns
    Type Description
    Tool

    The tool.

    Overrides
    Tool.ProcessMouseUp(MouseEventArgs)

    ZoomFrame(Rectangle)

    Fit viewport to given frame.

    Declaration
    protected virtual void ZoomFrame(Rectangle rcZoom)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rcZoom

    The zoom frame.

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved