Search results

Native Events in Blazor Diagram component

08 Apr 2021 / 1 minute to read

The Diagram control provides event support, which triggers while interacting with the diagram. Also, Syncfusion provides native event support in blazor for the following events

Event Name Event Type
onfocus FocusEventArgs
onclick MouseEventArgs
onmousemove MouseEventArgs
onmouseover MouseEventArgs
onmouseout MouseEventArgs
onmousedown MouseEventArgs
onmouseup MouseEventArgs
ondblclick MouseEventArgs
onkeydown KeyboardEventArgs
onkeyup KeyboardEventArgs
ondrop DragEventArgs

The native events can be defined as mentioned below. For example, the onmousedown event in diagram.

Copied to clipboard
@using Syncfusion.Blazor.Diagrams
<SfDiagram @onmousedown="@OnMouseDown" Height="600px"/>

    public void OnMouseDown(MouseEventArgs args)
        //Action to be performed