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

New Properties for nodes to be shown in PropertyEditor

Hi SyncFusion Support,

I am creating a modeling tools using SyncFusion Diagram, and would like to create some new custom properties for the Node (like Collection of node attributes populated from a database), which user can see through the PropertyEditor and when they modify those values, new attribute values will be caught and updated in the database.

When I viewed the Custom Symbol sample from SyncFusion, I come across this line of code:

props[2] = TypeDescriptor.CreateProperty(typeof(MySymbol), "Labels", typeof(LabelCollection), attrs);

and that is similar to what I want, however, in this case, the "Labels" type is somehow predefined, my question is, how can I create my own property collection.

I did searched similar threads on this problem but the codes and advices provided no longer work with the current version of SyncFusion, so any help corresponding to the current version is much appreciated.

Thanks,
SlackBear

5 Replies

RR Ramya R Syncfusion Team July 31, 2007 12:16 PM UTC

Hi SlackBear,

Thank you for your interest in Syncfusion Products.

If your intention is to use your own property collection class instead of the predefined LabelCollection class then it can be done as shown in the code snippet below,

props[2] = TypeDescriptor.CreateProperty(typeof(MySymbol), "MyCollection", typeof(), attrs);

Please let me know if I have misunderstood your requirement.

Also please let me know if you have any queries.

Thanks & Regards,
Ramya.


SL SlackBear August 7, 2007 06:46 AM UTC

Hi Ramya,

Thanks for your reply. That was close to what I wanted.

Just another question, currently, for each property under the Symbol (e.g. Name, ClickCount), there should be a predefined-function associated (ClickCount()). This requires us to define each function for each property we want to display under the propertyEditor.

My question is, if the properties are unknown, is there anyway we can still display all those properties at run time.

Thanks for your support,
SlackBear


J. J.Nagarajan Syncfusion Team August 9, 2007 11:27 PM UTC

Hi Slack,

Could you please let us know what do you mean by unknown properties? If you are trying to add some custom properties then this should be made visible in the property editor at run time. Please refer to the CustomSymbol sample.

Please let me know if I am missing something?

Regards,
Nagaraj


SL SlackBear August 10, 2007 03:10 AM UTC

Sorry I didnt make it clear.

What I eventually would like to do is adding/modifying Dynamic Properties in PropertyEditor at run time.

Thanks,
SlackBear

>Hi Slack,

Could you please let us know what do you mean by unknown properties? If you are trying to add some custom properties then this should be made visible in the property editor at run time. Please refer to the CustomSymbol sample.

Please let me know if I am missing something?

Regards,
Nagaraj


MF Meera Fathima Syncfusion Team August 10, 2007 10:10 AM UTC


Hello SlackBear,

At present Essential Diagram does not provide support for adding/modifying new (dynamic)properties at run time. However you can add any number of properties to a node programmatically and can display them in the property editor by customizing the desired node class(for e.g. Group node) and TypeConverter class as demonstrated in the Diagram Samples\Symbol Design\Custom Symbol sample.

Please let me know if you have any more questions regarding this.

Thanks,
Meera.

Loader.
Live Chat Icon For mobile
Up arrow icon