I need to be able to programatically add a symbol from a palette to a diagram. I can do it using the GetChildByName method, but I cannot for the life of me work out how I can control the size of the symbol added.
I am sure I am missing a very simple step.
ADAdministrator Syncfusion Team September 2, 2004 12:36 PM
Here is a sample demonstrating what you are looking for. In this sample, the Triangle symbol from the Palette is added when you run the application. The symbol is resized by changing it''s bounds. Here is the code snippet from the Form''s Load:
InsertNodesCmd insCmd = new InsertNodesCmd();
//Select the Triangle from the PaletteGroupView
SymbolModel symModel = this.paletteGroupView1.SelectedSymbolModel;
NodeCollection nodes = new NodeCollection();
//Add Symbol to the NodeCollection
if (symModel != null)
Symbol triangle = symModel.CreateSymbol();
triangle.Bounds = new RectangleF(100,100,200,200);
insCmd.Location = new Point(125,125);
//Execute the InsertNodesCmd