Class IBlazorConnectionChangeEventArgs
Notifies when the connector’s source id or target id was changed.
Inheritance
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 | The DiagramConnector representing the new source node or target node of the connector. |
ConnectorEnd
Returns the wether it is source end or target end.
Declaration
public string ConnectorEnd { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
NewValue
Returns the current source or target node of the connector.
Declaration
public BlazorConnectionObject NewValue { get; set; }
Property Value
Type | Description |
---|---|
BlazorConnectionObject | The BlazorConnectionObject representing the current source or target node of the connector. |
OldValue
Returns the previous source or target node of the connector.
Declaration
public BlazorConnectionObject OldValue { get; set; }
Property Value
Type | Description |
---|---|
BlazorConnectionObject | The BlazorConnectionObject representing the previous source or target node of the connector. |
State
Returns the state of connection endpoint dragging such as starting, completed.
Declaration
public EventState State { get; set; }
Property Value
Type | Description |
---|---|
EventState | The EventState representing the state of connection endpoint dragging. |