Custom Property Editor

I have created some custom symbol shapes using the CustomSymbol example as a template. It does nearly everything I need.

However, I need to do one more thing: I need to be able to pop up a custom editor when one of my custom properties has been selected.

For instance, one of my properties is a file name. When the user selects the property "File Name" in the propertyEditor, I want to show a button that would allow him to pop up the file open dialog.

How do I do this?


2 Replies

AD Administrator Syncfusion Team November 4, 2008 04:29 PM UTC

Hi RAS,

Thanks for your interest in Syncfusion products.

you can create the custom editor for syncfusion Custome shapes. If you need to create the UITypeEditor for

properties and add the proeprties in custom properties list that list out the properties.

[EditorAttribute(typeof(LightShapeEditor),typeof(System.Drawing.Design.UITypeEditor))]
public string CustomFileName
{
get
{
return name;
}
set
{
name = value;
}
}

//Added it to the properties list.

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

Please refer the below attached sample.

CustomProperties.zip

Please let me know if this helps.

Thanks,
Ramesh M.




RA Ron Alan Sawyer November 4, 2008 09:50 PM UTC

Thank you.


Loader.
Up arrow icon