Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to associate custom data with the items in the diagram (nodes and links)?

0
Posted

How to associate custom data with the items in the diagram (nodes and links)?

0

You can create your own class that derives from ShapeNode and add an ID property to it. To let users create items of your type, set the view.Behavior to Custom and the view.CustomNodeType to typeof(your_node_class). For an example showing how to use custom types with FlowChart.NET, check the IconNodes sample project. A more simple solution is to assign the id to the item’s Tag property. An additional “bonus” is that you will be able to use the FindNode method of Diagram to search for nodes by their tag/ID.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123