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.
Unfortunately, activation email could not send to your email. Please try again.

getting symbolmodel for dropped symbol

Thread ID:





37440 Nov 22,2005 03:14 AM Nov 30,2005 10:02 AM Windows Forms 3
Tags: Diagram
Asked On November 22, 2005 03:14 AM

Hi I tried putting this under direct trac but not able to submit there I have a requirement in which the senario goes like this 1> A Custom symbol is dragged and dropped into the diagram from a symbolpalette(A list View in my case). 2> I change some of the custom properties of the symbol and when i change one of the property i need to add it to another symbolpallette with those modified properties. So now the problem is i get the Symbol from the Diagram but not able to retrieve the symbolmodel to get/set the plugin class and assmbly etc Also i would like u to knowthat i am not using Pallette directly and loading it into the Listview coz i need multicolumns. And if i iterate through the the palletgroupbar.GetPalette(i) it return null though it returns the count prompt reply would be great Thanks Sachin

Administrator [Syncfusion]
Replied On November 23, 2005 10:34 AM

Hi Sachin, Essential Diagram Symbol objects are not aware of their SymbolModels. If your intention is to retrieve the SymbolModel using information sourced from the Symbol then it is up to your application to provide this data to the Symbol instance. Assuming that you are assigning identifiable names for your SymbolModels while designing them, then an option would be to simply add the SymbolModel''s name to the Symbol''s property table. Your application can then refer to this particular property to retrieve the SymbolModel from the SymbolPalette that was used for creating it. The IPropertyContainer.SetPropertyValue(string, object)/GetPropertyValue(string) methods that the Symbol class implements will come in handy for adding new properties. It looks like you are using subclassed symbols in your application. If so then the property initialization could very well be done from within the symbol subclass definition. Thanks, Prakash Surendra Syncfusion Inc.,

Replied On November 24, 2005 08:05 AM

Hi Prakash Thanks for the prompt reply, I was able to retrive the symbolmodel and thought it would solve my issue but it did not. What i wanted was, when one of the property is changed, the symbol with modified properties is added to another symbolpalette. But now , though i am able to retrive the symbolModel for the dropped symbol still I cannot clone the symbolmodel or create new instance of it.So whatever changes i make to it are reflected in the orignal symbolpalette also. Here is basically what i Want: I want to add the new symbol to the symbolpalette, with modified properties, so the next time it is dropped from new palette it is exact replica of the one it was created from without modifying the source symbolpalette''s SymbolModel.

Administrator [Syncfusion]
Replied On November 30, 2005 10:02 AM

Sachin, Creating a SymbolModel from a Symbol has been discussed previously in this forum, and I believe, we also provided a sample that shows how to go about programmatically synthesizing a SymbolModel. There is no automatic way to transfer the properties of the Symbol onto the SymbolModels. The only option that I can think is for your application to keep track of the properties that are being changed on the Symbol, and apply these properties to the SymbolModel clone in the second palette. The Symbol.PropertyChanging/PropertyChanged events should help you keep track of the new applied properties. 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.

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.