Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class IBlazorMouseEventArgs - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class IBlazorMouseEventArgs

    Notifies when the mouse events such as mouse enter, mouse leave, and mouseover are detected.

    Inheritance
    System.Object
    IBlazorMouseEventArgs
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class IBlazorMouseEventArgs : Object
    Remarks
    Blazor Property: MouseEnter Triggers when the mouse enters a node or connector
    Blazor Property: MouseLeave Triggers when the mouse leave from the node or connector
    The following code shows how to define MouseEnter event.
    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
           <DiagramSnapSettings Constraints = "SnapConstraints.None" ></ DiagramSnapSettings >
           < DiagramEvents MouseEnter="Enter"></DiagramEvents>
    </SfDiagram>
    @code
       {
       public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>();
       public void Enter(IBlazorMouseEventArgs args)
       {
           if ((args != null) && (args.Element == null) && (args.ActualObject != null) && (args.Targets != null))
           {
               Console.WriteLine("Entered");
           }
       }
       protected override void OnInitialized()
       {
           /// A node is created and stored in the node array.
           DiagramNode Node = new DiagramNode()
           {
               Id = "node1",
               Height = 100,
               Width = 100,
               OffsetX = 300,
               OffsetY = 100,
           };
           NodeCollection.Add(Node);
       }
    }

    Constructors

    IBlazorMouseEventArgs()

    Declaration
    public IBlazorMouseEventArgs()

    Properties

    ActualObject

    Returns the object such as node or connector when the mouse hovers over the object.

    Declaration
    public DiagramMouseEventObject ActualObject { get; set; }
    Property Value
    Type Description
    DiagramMouseEventObject

    Element

    Returns the parent of the target node or connector.

    Declaration
    public DiagramMouseEventObject Element { get; set; }
    Property Value
    Type Description
    DiagramMouseEventObject

    Targets

    Returns the target object over which the selected object is dragged.

    Declaration
    public DiagramEventObjectCollection Targets { get; set; }
    Property Value
    Type Description
    DiagramEventObjectCollection
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved