How to serialize properties of items that do not implement IComponent in a collection?

Platform: WinForms| Category: Tips

You have to set DesignerSerializationVisibility attribute on the property whose type is a strongly-typed collection to Content. You have to ensure the collection is created at startup or on demand. In order to support serialization of items that do not implement IComponent into your code you have to write a TypeConverter for that class that can convert to InstanceDescriptor. See the documentation on InstanceDescriptor for an example.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.