Blazor

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

    Show / Hide Table of Contents

    Class IBlazorClickEventArgs

    Notifies when clicking on an object or diagram.

    Inheritance
    System.Object
    IBlazorClickEventArgs
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class IBlazorClickEventArgs : Object
    Examples
    <SfDiagram Height=”600px” Nodes=”@NodeCollection">
       <DiagramEvents Clicked = "Clicked" ></ DiagramEvents >
    </ SfDiagram >
    @code
       {
       public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>();
       public void Clicked(IBlazorClickEventArgs args)
       {
           if ((args != null) && (args.Element != null) && (args.Count == 1) && (args.Position != null) && (args.ActualObject != null))
           {
               Console.WriteLine("Clicked");
           }
       }
       protected override void OnInitialized()
       {
           NodeCollection = new ObservableCollection<DiagramNode>()
           {
               new DiagramNode(){
                   Id="node1",
                   Height = 100,
                   Width = 100,
                   OffsetX = 300,
                   OffsetY = 100
               },
           };
       }
    }

    Constructors

    IBlazorClickEventArgs()

    Declaration
    public IBlazorClickEventArgs()

    Properties

    ActualObject

    Returns the object to be clicked on, or returns the diagram Id when the diagram clicks on.

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

    Button

    Returns which mouse button is clicked.

    Declaration
    public MouseButtons Button { get; set; }
    Property Value
    Type Description
    MouseButtons

    Count

    Returns number of times the object or diagram has clicked.

    Declaration
    public double Count { get; set; }
    Property Value
    Type Description
    System.Double

    Element

    Returns the object or id of the diagram based on which has been clicked.

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

    Position

    Returns the position of the clicked object.

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