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.
Unfortunately, activation email could not send to your email. Please try again.

Property Editor

Thread ID:

Created:

Updated:

Platform:

Replies:

36622 Nov 3,2005 01:38 PM Nov 10,2005 11:04 AM Windows Forms 1
loading
Tags: Diagram
Chris C
Asked On November 3, 2005 01:38 PM

I have a question that is related to the property editor. We have a derived symbol class with a dynamic number of custom properties. We are using a collection to hold the properties since we don''t know the total number of custom properties until the symbol instance is created. We don''t want to display the custom properties as a collection (i.e. we don''t want the collection editor button or an expandable tree) Instead, we would like to list the properties as if they were all separate properties, not related to a collection. I realize that this is really a .NET question relating to the property grid but I was hoping someone out there might be able to help us or point us in the right direction. Thanks, Chris

Prakash S [Syncfusion]
Replied On November 10, 2005 11:04 AM

Hi Chris, You can selectively expose the properties of an object by using a TypeDescriptor for the class. The use of a TypeDescriptor to filter out the properties of an Essential Diagram Symbol is demonstrated in the QuickStart\CustomSymbol sample that ships with the product. Please refer to the MySymbol.cs file in that sample to view the symbol''s TypeDescriptor. In your case, you can simply hide the collection property from the PropertyEditor by using an ''EditorBrowsableAttribute'' with the ''EditorBrowsableState.Never'' state on the particular property. You can then use the class TypeDescriptor''s GetProperties() override to iterate through the particular collection property and expose the collection properties as top-level properties of the type. Thanks, Prakash Surendra Syncfusion Inc.,

CONFIRMATION

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.

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.

;