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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding properties to a symbol model

Thread ID:





20225 Oct 12,2004 06:05 PM UTC Oct 13,2004 01:34 PM UTC WinForms 1
Tags: Diagram
Truman Lackey
Asked On October 12, 2004 06:05 PM UTC

I have looked at the symbol designer and the Diagram editor and have looked at the code for custom properties when a symbol is on a diagram control. What I want to do is add a properties collection to the symbol model like the labels collection. This way I can create custom symbol model properties and create symbols based on this new model. Any suggestions or help would be greatly appreciated.

Administrator [Syncfusion]
Replied On October 13, 2004 01:34 PM UTC

Hi Truman You can do what you describe by subclassing the Symbol class. You can also add your custom properties to symbols by calling SetPropertyValue(). You can pass it the name you want to assign to the property and the value. Properties that you add using this technique will be automatically serialized. Take a look at the CustomSymbol sample which demonstrates how a new property (Clickcount) is added to a derived Symbol (MySymbol). It also demonstrates how this property can be displayed in the Property Editor and also how it can be serialized. Regards Arun


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon