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

Diagram nodes... changing parent and child

When I''m creating a diagram all the inserted symbols are created as a child node of the root of the model. What I wanted is that when I link the symbols de target symbol was made a child node of the source symbol and in the end, there was a tree(inverted) of symbols. So that I had a symbol (only one) child of the model root and then... they were organized as a tree. How can I make this and how can the model help me ? ...what are the features I can use to make this ? Thank You

1 Reply

AD Administrator Syncfusion Team March 16, 2005 04:11 PM

Hi Rui, All symbols contained by the diagram will have to be children of the Diagram Model or child nodes of Layers that in turn children of the Diagram model. It is not possible to add symbols as child nodes of other existing symbols, and still have them function as top-level nodes that are not constrained by the parent symbol''s bounds. I assume that you require such a hierarchical structure for being able to traverse through the diagram''s node list. You can do this simply by using the Symbol class''s Symbol.EdgesEntering and Symbol.EdgesLeaving properties to access the Links that enter and leave a symbol, and the Link.FromNode and Link.ToNode properties to get the symbols that the link connects to. Assuming that your diagram has a reference to the first (or root) symbol contained in the Model, you can use the aforementioned properties to create a virtual tree structure. Regards, Prakash Surendra Syncfusion Inc.,

Loader.
Live Chat Icon For mobile
Up arrow icon