menu

WinForms

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

    Show / Hide Table of Contents

    Class MoveTool

    Interactive tool for moving nodes on a diagram.

    Inheritance
    System.Object
    Tool
    MoveTool
    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.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.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.OutlineConnectionPoint(Graphics, ConnectionPoint)
    Tool.PrecedingTool
    Tool.ProcessClick()
    Tool.ProcessKeyDown(KeyEventArgs)
    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
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Windows.dll
    Syntax
    public class MoveTool : Tool, IDisposable
    Remarks

    Tool

    Constructors

    MoveTool(DiagramController, Tool, Node)

    Initializes a new instance of the MoveTool class.

    Declaration
    public MoveTool(DiagramController controller, Tool toolPrevious, Node nodeAdded)
    Parameters
    Type Name Description
    DiagramController controller

    The controller.

    Tool toolPrevious

    The tool previous.

    Node nodeAdded

    The node added.

    Fields

    m_currentOffset

    Offset of current mouse position from the original mouse position in client coordinates.

    Declaration
    protected SizeF m_currentOffset
    Field Value
    Type
    System.Drawing.SizeF

    Properties

    DragCopyOffset

    Gets or sets offset to clone moved node with using Ctrl key.

    Declaration
    public float DragCopyOffset { get; set; }
    Property Value
    Type Description
    System.Single

    The drag copy offset.

    Moved

    Gets a value indicating whether move tool has moved nodes it is operating with.

    Declaration
    public bool Moved { get; }
    Property Value
    Type
    System.Boolean

    NodesToMove

    Gets node collection to move on mouse up.

    Declaration
    protected NodeCollection NodesToMove { get; }
    Property Value
    Type
    NodeCollection

    Snapshots

    Gets the snapshots hashtable where key is control node and value - image cache.

    Declaration
    protected Hashtable Snapshots { get; }
    Property Value
    Type Description
    System.Collections.Hashtable

    The snapshots.

    Methods

    Abort()

    Aborts tool actions.

    Declaration
    public override Tool Abort()
    Returns
    Type Description
    Tool

    The tool to abort.

    Overrides
    Tool.Abort()

    CanMove()

    Checks whether move command can be performed.

    Declaration
    protected virtual bool CanMove()
    Returns
    Type Description
    System.Boolean

    true, if can move.

    DeactivateTool()

    Deactivates the tool.

    Declaration
    public override void DeactivateTool()
    Overrides
    Tool.DeactivateTool()

    Dispose()

    Declaration
    public override void Dispose()
    Overrides
    Tool.Dispose()

    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)

    GetAllowedNodes(NodeCollection)

    Returns a collection of nodes that are allowed to move.

    Declaration
    protected NodeCollection GetAllowedNodes(NodeCollection nodesIn)
    Parameters
    Type Name Description
    NodeCollection nodesIn

    Nodes to test.

    Returns
    Type Description
    NodeCollection

    Collection of nodes that can move.

    GetCurrentOffset()

    Get move offset with origin offsets in client coordinates.

    Declaration
    protected virtual SizeF GetCurrentOffset()
    Returns
    Type Description
    System.Drawing.SizeF

    Current move offset with origin offsets.

    MoveNodes()

    Move the nodes to current offset.

    Declaration
    protected virtual void MoveNodes()

    OnOriginChanged(ViewOriginEventArgs)

    Raise the origin changed event.

    Declaration
    protected override void OnOriginChanged(ViewOriginEventArgs evtArgs)
    Parameters
    Type Name Description
    ViewOriginEventArgs evtArgs

    The ViewOriginEventArgs instance containing the event data.

    Overrides
    Tool.OnOriginChanged(ViewOriginEventArgs)

    ProcessDoubleClick(MouseEventArgs)

    Processes the double click.

    Declaration
    public override Tool ProcessDoubleClick(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.ProcessDoubleClick(MouseEventArgs)

    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
    Tool.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
    Tool.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)

    UpdateMoveOffset(Node, SizeF)

    Updates the move offset.

    Declaration
    protected SizeF UpdateMoveOffset(Node nodeMoving, SizeF szMovingOffset)
    Parameters
    Type Name Description
    Node nodeMoving

    The moving node.

    System.Drawing.SizeF szMovingOffset

    The offset.

    Returns
    Type Description
    System.Drawing.SizeF

    The size of the offset.

    Implements

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