menu

Blazor

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

    Show / Hide Table of Contents

    Class ConnectorDrawingController

    Represents a specialized controller that manages the interactive drawing and creation of connectors in a SfDiagramComponent.

    Inheritance
    System.Object
    CommonController
    InteractionControllerBase
    ConnectionController
    ConnectorDrawingController
    Inherited Members
    ConnectionController.OnMouseLeave(DiagramMouseEventArgs)
    InteractionControllerBase.CurrentPosition
    InteractionControllerBase.InAction
    InteractionControllerBase.PreviousPosition
    InteractionControllerBase.StartPosition
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ConnectorDrawingController : ConnectionController
    Remarks

    The ConnectorDrawingController extends ConnectionController to provide functionality for drawing new connectors by handling mouse interactions during the connector creation process.

    This controller manages the entire lifecycle of connector drawing, from initial mouse down events through mouse movement tracking to final connector placement and connection establishment.

    Constructors

    ConnectorDrawingController(SfDiagramComponent, DiagramElementAction)

    Initializes a new instance of the ConnectorDrawingController class for managing connector drawing operations.

    Declaration
    public ConnectorDrawingController(SfDiagramComponent diagram, DiagramElementAction endPoint)
    Parameters
    Type Name Description
    SfDiagramComponent diagram

    The SfDiagramComponent instance that this controller will manage for connector drawing operations.

    DiagramElementAction endPoint

    The DiagramElementAction that specifies the initial action or endpoint configuration for connector creation.

    Remarks

    The ConnectorDrawingController extends ConnectionController to handle mouse interactions during connector creation.

    This controller manages the connector drawing lifecycle from mouse events to final placement and connection establishment.

    Methods

    OnMouseDown(DiagramMouseEventArgs)

    Handles the mouse down event when the mouse pointer is moved over the diagram and a mouse button is pressed during connector drawing operations.

    Declaration
    public override void OnMouseDown(DiagramMouseEventArgs args)
    Parameters
    Type Name Description
    DiagramMouseEventArgs args

    A DiagramMouseEventArgs containing information about the mouse event, including position coordinates, button state, and target elements.

    Overrides
    ConnectionController.OnMouseDown(DiagramMouseEventArgs)
    Remarks

    Sets the InAction property to true to initiate connector drawing and calls the base implementation for proper event handling.

    OnMouseMove(DiagramMouseEventArgs)

    Handles mouse movement events during connector drawing operations when the connector end thumb is being dragged.

    Declaration
    public override bool OnMouseMove(DiagramMouseEventArgs args)
    Parameters
    Type Name Description
    DiagramMouseEventArgs args

    A DiagramMouseEventArgs containing mouse event information including position, button state, and target elements. Can be null if no event data is available.

    Returns
    Type Description
    System.Boolean

    A System.Boolean value indicating whether the mouse move event was handled.

    Overrides
    ConnectionController.OnMouseMove(DiagramMouseEventArgs)
    Remarks

    This method is called continuously during connector drawing when the end thumb is dragged, providing real-time visual feedback and maintaining drawing state.

    Performance consideration: Called frequently during mouse movement.

    OnMouseUp(DiagramMouseEventArgs)

    Handles the mouse up event when the mouse pointer is moved over the connector and a mouse button is released during connector drawing operations.

    Declaration
    public override void OnMouseUp(DiagramMouseEventArgs args)
    Parameters
    Type Name Description
    DiagramMouseEventArgs args

    A DiagramMouseEventArgs containing the mouse event data, including position coordinates and button information. Can be null if no event data is available.

    Overrides
    ConnectionController.OnMouseUp(DiagramMouseEventArgs)
    Remarks

    This method completes the connector drawing workflow by controlling the action lifecycle and adding the drawn connector to the diagram.

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