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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





121612 Jan 7,2016 11:40 AM UTC Jan 8,2016 06:41 AM UTC WinForms 1
Tags: Diagram
Asked On January 7, 2016 11:40 AM UTC


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!


Naganathan Ganesh Babu [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon