Search
ControlNode.Control Property
See Also
 





Gets or sets the .NET control hosted inside this node.

Namespace: MindFusion.Diagramming.WinForms
Assembly: MindFusion.Diagramming.WinForms

 Syntax

C#  Copy Code

public Control Control { get; set; }

Visual Basic  Copy Code

Public Property Control As Control

 Property Value

An instance of a any Control-derived class.

 Remarks

A ControlNode drawn by the user has its Control initialized to an instance of the DefaultControlType type. At any time you can assign another control to this property.

 Example

The example below shows how to create a new ControlNode node and set its control:

C#  Copy Code

ControlNode host = new ControlNode(diagramView);
host.Control = new DataGrid();
diagram.Nodes.Add(host);

Visual Basic  Copy Code
Dim host As ControlNode = New ControlNode(DiagramView)
host.Control = New DataGrid()
Diagram.Nodes.Add(host)

 See Also