WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IMouseController - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IMouseController

    IMouseController defines the interface for mouse controllers to be used with MouseControllerDispatcher.

    Namespace: Syncfusion.Windows.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public interface IMouseController
    Remarks

    Any mouse controller needs to implement the IMouseController interface.

    In its implementation of MouseController.HitTest, the mouse controller should determine whether your controller wants to handle the mouse events based current context.

    See MouseControllerDispatcher for further discussion.

    Properties

    Cursor

    Returns the cursor to be displayed.

    Declaration
    Cursor Cursor { get; }
    Property Value
    Type Description
    System.Windows.Forms.Cursor

    Name

    Returns the name of this mouse controller.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    System.String

    Methods

    CancelMode()

    CancelMode is called for the active controller after a MouseDown message when the mouse operation is cancelled.

    Declaration
    void CancelMode()

    HitTest(MouseEventArgs, IMouseController)

    HitTest is called to determine whether your controller wants to handle the mouse events based current context.

    Declaration
    int HitTest(MouseEventArgs mouseEventArgs, IMouseController controller)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs mouseEventArgs
    IMouseController controller
    Returns
    Type Description
    System.Int32
    Remarks

    The current winner of the vote is specified through the controller parameter. Your implementation of HitTest can decide if it wants to override the existing vote or leave it.

    MouseDown(MouseEventArgs)

    MouseDown is called when this controller signaled in HitTest that it wants to handle mouse events and the user pressed the mouse button.

    Declaration
    void MouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e
    Remarks

    MouseDown is called and this controller will become the active controller and receive all subsequent mouse messages until the mouse button is released or the mouse operation is cancelled.

    MouseHover(MouseEventArgs)

    MouseHover is called when this controller signaled in HitTest that it wants to handle mouse events. MouseHover is called after MouseHoverEnter.

    Declaration
    void MouseHover(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    MouseHoverEnter()

    MouseHoverEnter is called when this controller signaled in HitTest that it wants to handle mouse events. MouseHoverEnter is called before the MouseHover is called for the first time.

    Declaration
    void MouseHoverEnter()

    MouseHoverLeave(EventArgs)

    MouseHoverLeave is called when hovering ends either because user dragged mouse out of the hit-test area or when context changes (e.g. user pressed the mouse button).

    Declaration
    void MouseHoverLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    MouseMove(MouseEventArgs)

    MouseMove is called for the active controller after a MouseDown message when the user moves the mouse pointer.

    Declaration
    void MouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    MouseUp(MouseEventArgs)

    MouseUp is called for the active controller after a MouseDown message when the user releases the mouse button.

    Declaration
    void MouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved