Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

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

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 statup 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 InstanceDescriptor in the MSDN Library for an example.

Contributed from George Shepherd's Windows Forms FAQ



Page view counter