Search
Diagram.Nodes Property
See Also
 





Gets a collection of all DiagramNode objects in the diagram.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public DiagramNodeCollection Nodes { get; }

Visual Basic  Copy Code

Public ReadOnly Property Nodes As DiagramNodeCollection

 Property Value

An instance of the DiagramNodeCollection class.

 Remarks

Nodes provides type-safe access to all nodes in the current diagram. Any diagram element can be accessed also by using the Items collection.

 Example

The following code adds a new ControlNode to the diagram:

C#  Copy Code

ControlNode controlNode = new ControlNode(diagramView);
controlNode.Bounds = new RectangleF(10, 10, 30, 30);
controlNode.Control = new DataGrid();
diagram.Nodes.Add(controlNode);

Visual Basic  Copy Code

Dim controlNode As New ControlNode(diagramView)
controlNode.Bounds = New RectangleF(10, 10, 30, 30)
controlNode.Control = New DataGrid
diagram.Nodes.Add(controlNode)

 See Also