We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Node Border color to change while trying to connect nodes

Hi,

We have a requirement where we drag custom nodes on canvas say for example 4 custom node.
When we try to connect the two nodes we need to change the node border color of all the nodes which are available on canvas as per business logic.
But we didn't found any event other than mentioned below.

1) ConnectorDragStart 
2) ConnectorDragEnd
3) AfterConnectionCreate

All the above event gets fired when two nodes are connected.
Is there any event which will get raised as soon as we start to connect the two nodes.
For eg when we will try to connect head node with tail node as soon as connector line is being dragged then the border color of all the node has to be changed.

Thanks,
Ashish Nandavadekar

1 Reply

RA Ranjitha Amirthalingam Syncfusion Team February 29, 2016 01:01 PM UTC

Hi Ashish,

Thanks for contacting Syncfusion Support.

Please find the response to your queries as below.


S.No
Query
Response
1
When we try to connect the two nodes we need to change the node border color of all the nodes which are available on canvas as per business logic.
But we didn't found any event other than mentioned below.

1) ConnectorDragStart 
2) ConnectorDragEnd
3) AfterConnectionCreate

All the above event gets fired when two nodes are connected.

We have support to change the border color of the Node using BorderBrush and Border Thickness properties of Node.We have provided code example to represent this.Please refer to the code example as below.

Code Example:

node.BorderBrush = new SolidColorBrush(Colors.Red);
node.BorderThickness = new Thickness(5);

//Here, node is the instance of Node.


2
Is there any event which will get raised as soon as we start to connect the two nodes.
For eg when we will try to connect head node with tail node as soon as connector line is being dragged then the border color of all the node has to be changed.

We don’t have support for “an event will get raised when two nodes starts to connect”. We have HeadNodeChanged and TailNodeChanged events, which will get raised when the HeadNode and TailNode of the Connector is changed.




Regards,
Ranjitha A.

Loader.
Live Chat Icon For mobile
Up arrow icon