Blazor

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

    Show / Hide Table of Contents

    Class IBlazorDraggingEventArgs

    Notifies when the node or connector is dragged.

    Inheritance
    System.Object
    IBlazorDraggingEventArgs
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class IBlazorDraggingEventArgs : Object
    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
       <DiagramEvents OnPositionChange = "PositionChanged" ></ DiagramEvents >
    </ SfDiagram >
    @code
       {
       public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>();
       public void PositionChanged(IBlazorDraggingEventArgs args)
       {
           args.Cancel = true;
           if ((args != null) && (args.State == State.Completed))
           {
               Console.WriteLine("Dragging");
           }
       }
       protected override void OnInitialized()
       {
           NodeCollection = new ObservableCollection<DiagramNode>()
           {
               new DiagramNode(){
                   Id="node1",
                   Height = 100,
                   Width = 100,
                   OffsetX = 300,
                   OffsetY = 100
               },
           };
       }
    }

    Constructors

    IBlazorDraggingEventArgs()

    Declaration
    public IBlazorDraggingEventArgs()

    Properties

    AllowDrop

    Defines the object that can be dropped over another element.

    Declaration
    public bool AllowDrop { get; set; }
    Property Value
    Type Description
    System.Boolean

    Cancel

    Defines if the user can prevent dragging of element over the diagram.

    Declaration
    public bool Cancel { get; set; }
    Property Value
    Type Description
    System.Boolean

    NewValue

    Returns the current node or connector that is being dragged.

    Declaration
    public DiagramSelectedItems NewValue { get; set; }
    Property Value
    Type Description
    DiagramSelectedItems

    OldValue

    Returns the previous node or connector that has dragged.

    Declaration
    public DiagramSelectedItems OldValue { get; set; }
    Property Value
    Type Description
    DiagramSelectedItems

    Source

    Returns the node or connector that is being dragged.

    Declaration
    public DiagramSelectedItems Source { get; set; }
    Property Value
    Type Description
    DiagramSelectedItems

    State

    Returns the current action of the dragged element such as starting, dragging, completed.

    Declaration
    public State State { get; set; }
    Property Value
    Type Description
    State

    Target

    Returns the node or connector that has dragged.

    Declaration
    public DiagramEventObject Target { get; set; }
    Property Value
    Type Description
    DiagramEventObject

    TargetPosition

    Returns the position of the Target.

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