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

Custom properties in propertyEditor

Hi, Is there a way to add extra properties to the propertyEditor window, without editing the Syncfusion source. Quite simply, I want to add a backgroundImage property to display in the propertyEditor when the diagramComponent is clicked. I know this is already defined under textures, but I want to make this easier for the client to find. I believe this can be done by editing the diagramComponent.Model code, but is there an easier way of doing this that would not require a rebuild of the Syncfusion dlls. Richard

1 Reply

AD Administrator Syncfusion Team August 13, 2004 11:40 AM UTC

Hi Richard, Here is a modified version of the DiagramBuilder sample demonstrating what you are looking for. The sample uses a derived Diagram (MyDiagram) whose CreateModel method is overridden to use a derived Model (MyModel). MyModel’s SetDefaultPropertyValues is overridden to add the new BackgroundImage property using the SetPropertyValue method. When you build and run the sample you can now see the new property (BackgroundImage) in the Property Editor. Also take a look at the CustomSymbol sample that demonstrates how you can add or selectively display properties for a Symbol. As demonstrated, you will have to create a TypeConverter and subclass the Symbol class to control the properties are exposed in the property grid. Regards Arun

Loader.
Live Chat Icon For mobile
Up arrow icon