AD
Administrator
Syncfusion Team
September 15, 2005 09:00 PM UTC
Hi Darren,
You can use the SymbolPalette.GetChildByName(string) method to obtain the SymbolModel that you are interested in. Once you have the SymbolModel, you can call SymbolModel.CreateSymbol() to instantiate the symbol instance. If you are using the PaletteGroupView control, the PaletteGroupView.Palette property will let you retrieve the SymbolPalette loaded into the control.
The following code should give you an idea,
// Obtain the ''Start'' SymbolModel and instantiate the symbol
SymbolModel symmodel = this.GetSymbolModel(palette,"Start");
Symbol sym = symmodel.CreateSymbol();
// Get the SymbolModel from the SymbolPalette
public SymbolModel GetSymbolModel(SymbolPalette palette, string symbolName)
{
INode symmodel = palette.GetChildByName(symbolName);
if(symmodel != null)
return (SymbolModel)symmodel;
return null;
}
Thanks,
Prakash Surendra
Syncfusion Inc.,