How To Programmatically Add a Symbol From the Palette

29 Feb 20161 minute to read

The following code sample demonstrates how you can programmatically add a symbol from the symbol palette to a diagram.

if (paletteGroupView1.Palette.Nodes.Count > 0)


   Node nc =(Node)paletteGroupView1.Palette.Nodes[0].Clone();                


If paletteGroupView1.Palette.Nodes.Count > 0 Then 

  	Dim nc As Node = DirectCast(paletteGroupView1.Palette.Nodes(0).Clone(), Node) 


End If