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

Custom usercontrol within node => how to access the node from within the control


I am experimenting with the diagram and try to achieve the following:

I want to create a (simple) graphical programming interface that executes a function block (here: a node with a custom usercontrol) and when it has finished it's task it shall activte all connected nodes.
I was able to create the nodes programmatically with help of the ControlsGalore sample and also to access all following nodes ("ToNode") with help of the SimpleDrillDown sample.
However, I need to access the node containing my usercontrol from within my usercontrol to determine which nodes are linked to the current node. This is where I am failing right now. How can I do this?

Thank you in advance!


1 Reply

NG Naganathan Ganesh Babu Syncfusion Team January 8, 2016 06:41 AM UTC

Hi Lars,


The ControlNode’s “HostingControl” property is used to get the control which is assigned in the control node and the Node’s “EdgesLeaving” property is used to get the Nodes which are connected from the current node also the property “EdgesEntering” is used to get the Nodes which are connected to the current node. Please refer to the below code example and sample.    

Code Example:
//Getting connected nodes with current node
ICollection collection1 = node.EdgesLeaving;

//Getting connected control nodes with current node
control += ((node1 as ConnectorBase).ToNode as ControlNode).HostingControl.GetType().ToString();
Naganathan K G

Live Chat Icon For mobile
Up arrow icon