Blazor

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

    Show / Hide Table of Contents

    Class IBlazorConnectionChangeEventArgs

    Notifies when the connector’s source id or target id was changed.

    Inheritance
    System.Object
    IBlazorConnectionChangeEventArgs
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class IBlazorConnectionChangeEventArgs : Object
    Examples
    <SfDiagram Height="600px" Connectors="@ConnectorCollection">
       <DiagramEvents OnConnectionChange = "ConnectionChange" ></ DiagramEvents >
    </ SfDiagram >
    @code
    {
       //Defines diagram's connector collection
       public ObservableCollection<DiagramConnector> ConnectorCollection = new ObservableCollection<DiagramConnector>();
       public void ConnectionChange(IBlazorConnectionChangeEventArgs args)
       {
           args.Cancel = false;
           if ((args != null) && (args.Connector != null) && (args.ConnectorEnd != null) && (args.State == EventState.Changing) && (args.NewValue != null) && (args.OldValue != null))
           {
               Console.WriteLine("commandExecuted");
           }
       }
       protected override void OnInitialized()
       {
           DiagramConnector DiagramConnector = new DiagramConnector()
           {
               SourcePoint = new ConnectorSourcePoint() { X = 100, Y = 100 },
               TargetPoint = new ConnectorTargetPoint() { X = 200, Y = 200 },
               Style = new ConnectorShapeStyle() { StrokeColor = "#6f409f", StrokeWidth = 1 },
               ///Specify the segments types as straight.
               Type = Segments.Straight,
           };
           ConnectorCollection.Add(DiagramConnector);
       }
    }

    Constructors

    IBlazorConnectionChangeEventArgs()

    Declaration
    public IBlazorConnectionChangeEventArgs()

    Properties

    Cancel

    Defines wether the user can prevent the connection or disconnection of the connector or not.

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

    Connector

    Returns the new source node or target node of the connector.

    Declaration
    public DiagramConnector Connector { get; set; }
    Property Value
    Type Description
    DiagramConnector

    ConnectorEnd

    Returns the wether it is source end or target end.

    Declaration
    public string ConnectorEnd { get; set; }
    Property Value
    Type Description
    System.String

    NewValue

    Returns the current source or target node of the connector.

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

    OldValue

    Returns the previous source or target node of the connector.

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

    State

    Returns the state of connection endpoint dragging such as starting, completed.

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