AD
Administrator
Syncfusion Team
November 23, 2005 03:34 PM UTC
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.,
SA
Sachin
November 24, 2005 01:05 PM UTC
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.
AD
Administrator
Syncfusion Team
November 30, 2005 03:02 PM UTC
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.,