The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
PSPrakash S Syncfusion Team November 10, 2005 04:04 PM UTC
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.,