menu

Blazor

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

    Show / Hide Table of Contents

    Class CommonController

    Represents an abstract base class that provides common functionality and tools for all controller implementations.

    Inheritance
    System.Object
    CommonController
    InteractionControllerBase
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public abstract class CommonController : Object
    Remarks

    This abstract base class provides shared functionality for derived controller implementations and cannot be instantiated directly.

    Constructors

    CommonController()

    Declaration
    protected CommonController()

    Methods

    OnMouseDown(DiagramMouseEventArgs)

    Handles the mouse down event when the mouse pointer is moved over a diagram element and a mouse button is pressed.

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

    A DiagramMouseEventArgs containing information about the mouse event, including the mouse position, button pressed, and the target diagram element.

    Remarks

    This virtual method can be overridden in derived classes to implement custom mouse down behavior. Called automatically when a mouse button is pressed over a diagram element.

    OnMouseLeave(DiagramMouseEventArgs)

    Handles the mouse pointer leaving a diagram element.

    Declaration
    public virtual void OnMouseLeave(DiagramMouseEventArgs args)
    Parameters
    Type Name Description
    DiagramMouseEventArgs args

    A DiagramMouseEventArgs containing information about the mouse leave event, including the mouse position details.

    Remarks

    This virtual method is called automatically when the mouse pointer exits any diagram element. Override to implement custom behavior such as removing hover effects, hiding tooltips, or cleaning up temporary visual indicators.

    The default implementation provides no specific behavior.

    OnMouseMove(DiagramMouseEventArgs)

    Handles the mouse move event when the mouse pointer is moved over the diagram element.

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

    A DiagramMouseEventArgs containing information about the mouse move event, including cursor position and event state.

    Returns
    Type Description
    System.Boolean

    A System.Boolean indicating whether the mouse move operation is allowed. Returns true if the operation should proceed, or false if it should be blocked.

    Remarks

    This virtual method is called automatically during mouse movement over diagram elements. Derived classes can override to implement custom behavior or validation logic.

    The default implementation returns the inverse of the blocked field state.

    OnMouseUp(DiagramMouseEventArgs)

    Handles the mouse button release event when the mouse pointer is moved over a diagram element.

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

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

    Remarks

    This virtual method is called automatically when a mouse button is released over any diagram element. Override this method in derived classes to implement custom mouse release behavior such as completing drag operations or finalizing selections.

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