Thank you for your prompt response.
Yes, you're right. It works because a
DesignerSerializationVisibilityAttribute with a value of Content is
augmented to the collection property in your project.
When a serializer persists the persistable state of a design mode document,
it often adds code to the initialization method of components to persist
values of properties that have been set at design time. This happens by
default for most basic types, if no attribute has been set to direct other
With the DesignerSerializationVisibilityAttribute, you can indicate whether
the value for a property is Visible, and should be persisted in
initialization code, Hidden, and should not be persisted in initialization
code, or consists of Content, which should have initialization code
generated for each public, not hidden property of the object assigned to
Members that do not have a DesignerSerializationVisibilityAttribute will be
treated as though they have a DesignerSerializationVisibilityAttribute with
a value of Visible. The values of a property marked as Visible will be
serialized, if possible, by a serializer for the type. Note that not all
types has such a serializer, e.g. a derived class from CollectionBase, the
ExtendedLVColumnHeaderCollection in your project and etc. For the
properties of these types, we could apply a
DesignerSerializationVisibilityAttribute with a value of Content. Then, the
properties will be serialized in code.
When we apply a DesignerSerializationVisibilityAttribute with a value of
Content to a property, we could also specify custom serialization using the
The sample I sent to you in my first reply is the one that implement a
Hope this helps.
If you have any question, please feel free to let me know.
Microsoft Online Community Support