User Control / Collection Editor

  • Thread starter Thread starter Marco de Vries
  • Start date Start date
M

Marco de Vries

I have a user control and I want to add some properties
in design time using a Colelction editor. I defined a
type and collection for example.

Public Class TestDefinition
... properties get/set
End Class

Public Class TestCollection
inherits collectionbase
... add
... insert
... etc etc
End Class

This Collection I add as a property to a User Control

Getting the existing collection if any goes well but I
don't get the collection saved using the collection
editor.

Anyone ???
 
Public Class TestDefinition
... properties get/set
End Class

Imports System.ComponentModel
Public Class TestDefinition
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
Public Property ... As ...
Get ...
Set ...
End Property
End Class
 
Do you have your type converters built? As well as setting your collection
indexer to readonly. Plus using <DesignTimeVisibility(Content)> set on your
collection property.

There are tons of good articles on this. It's a pain other wise...

=)
 
Back
Top