Class PolylineDrawingController
Represents a specialized controller that enables dynamic drawing of polyline connectors using the PolyLine Drawing Tool in the SfDiagramComponent.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class PolylineDrawingController : InteractionControllerBase
Remarks
The PolylineDrawingController extends InteractionControllerBase to handle mouse events for creating polyline connectors.
This controller is activated when users select the polyline drawing tool and remains active until the drawing operation is completed or cancelled.
Constructors
PolylineDrawingController(SfDiagramComponent)
Initializes a new instance of the PolylineDrawingController class with the specified diagram component.
Declaration
public PolylineDrawingController(SfDiagramComponent diagram)
Parameters
Type | Name | Description |
---|---|---|
SfDiagramComponent | diagram | The SfDiagramComponent instance for polyline drawing operations. Cannot be null. |
Remarks
Initializes the controller by setting Syncfusion.Blazor.Diagram.PolylineDrawingController.EndPoint to ConnectorSourceEnd for interactive polyline creation.
Methods
OnMouseDown(DiagramMouseEventArgs)
Handles the mouse down event when the PolylineDrawingController is active and initiates polyline drawing operations.
Declaration
public override void OnMouseDown(DiagramMouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DiagramMouseEventArgs | args | A DiagramMouseEventArgs containing mouse event data for polyline point placement. |
Overrides
Remarks
Invoked automatically during polyline drawing mode to add new vertices to the polyline path.
Coordinates with the parent SfDiagramComponent to update drawing state and visual feedback.
OnMouseMove(DiagramMouseEventArgs)
Handles mouse move events during polyline drawing operations in the SfDiagramComponent.
Declaration
public override bool OnMouseMove(DiagramMouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DiagramMouseEventArgs | args | A DiagramMouseEventArgs containing mouse event data for polyline drawing feedback. |
Returns
Type | Description |
---|---|
System.Boolean | A System.Boolean indicating whether the event was handled. Returns true to block further event propagation. |
Overrides
Remarks
Invoked during mouse movement in polyline drawing mode to provide visual feedback and preview lines.
Works with OnMouseDown(DiagramMouseEventArgs) and OnMouseUp(DiagramMouseEventArgs) for complete polyline drawing interaction.
OnMouseUp(DiagramMouseEventArgs)
Handles the mouse-up event during polyline drawing operations in the SfDiagramComponent.
Declaration
public override void OnMouseUp(DiagramMouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DiagramMouseEventArgs | args | A DiagramMouseEventArgs containing mouse event data. Can be null. |
Overrides
Remarks
Invoked when the user releases a mouse button during polyline drawing mode. Finalizes the drawing operation by placing a point or completing the polyline.
Works with OnMouseDown(DiagramMouseEventArgs) and OnMouseMove(DiagramMouseEventArgs) for interactive polyline drawing.