We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Symbol Model programatically

Thread ID:





34784 Sep 15,2005 08:19 PM UTC Sep 15,2005 09:00 PM UTC WinForms 1
Tags: Diagram
Darren Mombourquette
Asked On September 15, 2005 08:19 PM UTC

This may be a stupid question. I have created a Symbol Model for an object using the symbol designer, set the plugin properties, saved the symbol pallete and loaded into the designer. Everything works fine when dragging a new symbol model to the diagram. What I can''t figure out is how to programatically get a reference to the symbol model already loaded in the pallete and create a symbol based off this model. I can easily create a new instance of the symbol itself and add it to the diagram but it doesn''t have the symbol model attached to it. Thanks, Darren

Administrator [Syncfusion]
Replied On 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.,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon