Thanks to both of you for your suggestions. I found some information at this link: http://blogs.msdn.com/toub/archive/2004/10/12/241277.aspxwhich had a fully qualified EditorAttribute. When I changed to the string attribute usage, items started to show up again when I clicked the ellipses although they are still not persisting.
Here is my info class with the Collection property. The info class is marked Serializable. I know it is calling the ItemCollection class because I had to add an empty constructor. All the type converter Plural2SingularInfoTypeConverter does is make it a node view so it collapses into the + sign.
[code]
<Serializable(), _
TypeConverter(GetType(Plural2SingularInfoTypeConverter))> _
Public Class Plural2SingularInfo
[/code]
[code]
Private m_Plural2SingularItemCollection As Plural2SingularItemCollection = _
New Plural2SingularItemCollection
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content), _
Description("Information pertaining to specific Plural2Singular items (eg Crises to Crisis)")> _
Public Property Plural2SingularItems() As Plural2SingularItemCollection
Get
Return m_Plural2SingularItemCollection
End Get
Set(ByVal Value As Plural2SingularItemCollection)
m_Plural2SingularItemCollection = Value
End Set
End Property 'Plural2SingularItems
[/code]
Here is the Plural2SingularItem class along with 2 of the properties. There are 4 total but they are parallel, one pair for the Plural and one pair for the Singular.
[code]
<Serializable(), _
TypeConverter(GetType(Plural2SingularItemTypeConverter))> _
Public Class Plural2SingularItem
[/code]
[code]
Private m_SingularCaseSensitive As Boolean = False
<DefaultValue(False), NotifyParentPropertyAttribute(True), _
Description("Is Singular value case sensitive")> _
Public Property SingularCaseSensitive() As Boolean
Get
Return m_SingularCaseSensitive
End Get
Set(ByVal Value As Boolean)
If Value = Nothing Then Value = False
If Not Value.Equals(m_SingularCaseSensitive) Then
m_SingularCaseSensitive = Value
End If
End Set
End Property 'SingularCaseSensitive
Private Const m_SINGULAR_DEFAULT As String = ""
Private m_Singular As String = GetDefaultSingular()
<DefaultValue(m_SINGULAR_DEFAULT), NotifyParentPropertyAttribute(True), _
Description("Singular form which matches corresponding Plural item (eg Crisis and Crises)")> _
Public Property Singular() As String
Get
Return m_Singular
End Get
Set(ByVal Value As String)
If Value = Nothing Then Value = String.Empty
If Not Value.Equals(m_Singular) Then
m_Singular = Value
End If
End Set
End Property 'Singular
Private Function GetDefaultSingular() As String
Return m_SINGULAR_DEFAULT
End Function 'GetDefaultSingular
Private Sub ResetSingular()
Me.Singular = GetDefaultSingular()
End Sub 'ResetSingular
[/code]
Here is the Plural2SingularItemTypeConverter class.
[code]
<System.Security.Permissions.PermissionSetAttribute( _
System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Friend Class Plural2SingularItemTypeConverter
Inherits TypeConverter
Public Overloads Overrides Function CanConvertFrom( _
ByVal context As ITypeDescriptorContext, _
ByVal sourceType As Type) As Boolean
If sourceType Is GetType(System.String) Then Return True
Return MyBase.CanConvertFrom(context, sourceType)
End Function 'CanConvertFrom
Public Overloads Overrides Function ConvertFrom(ByVal context As ITypeDescriptorContext, _
ByVal culture As CultureInfo, ByVal value As Object) As Object
If TypeOf value Is String Then
Dim temp As String() = value.ToString.Split(","c)
Return New Plural2SingularItem(CBool(temp(0)), temp(1), CBool(temp(2)), temp(3))
End If
Return MyBase.ConvertFrom(context, culture, value)
End Function 'ConvertFrom
Public Overloads Function CanConvertTo(ByVal context As ITypeDescriptorContext, _
ByVal destinationType As Type) As Boolean
If destinationType Is GetType(InstanceDescriptor) Then Return True
If destinationType Is GetType(System.String) Then Return True
Return MyBase.CanConvertTo(destinationType)
End Function 'CanConvertTo
Public Overloads Overrides Function ConvertTo( _
ByVal context As System.ComponentModel.ITypeDescriptorContext, _
ByVal culture As System.Globalization.CultureInfo, _
ByVal value As Object, _
ByVal destinationType As System.Type) As Object
Return MyBase.ConvertTo(context, culture, value, destinationType)
End Function 'ConvertTo
[/code]
And lastly, here is the Plural2SingularItemCollection class. When I used fully qualified type strings for the Editor, things started coming up correctly multiple times into the editor in design view, although it is still not persisting at all. I know this is the one being used because it shows (Collection) next to the ellipses in Design Mode.
[code]
<Serializable(), _
Editor("System.Windows.Forms.Design.CollectionEditor, System.Design", "System.Drawing.Design.UITypeEditor, System.Drawing")> _
Public Class Plural2SingularItemCollection
Inherits CollectionBase
Public Sub New()
End Sub 'New
Public Sub New(ByVal list() As Plural2SingularItem)
For Each item As Plural2SingularItem In list
Me.InnerList.Add(item)
Next
End Sub 'New
Public Overloads Overrides Function ToString() As String
Return "(Collection)"
End Function 'ToString
Default Public Property Item(ByVal index As Integer) As Plural2SingularItem
Get
Return CType(Me.InnerList(index), Plural2SingularItem)
End Get
Set(ByVal Value As Plural2SingularItem)
Me.InnerList(index) = Value
End Set
End Property 'Item
Public Function Add(ByVal value As Plural2SingularItem) As Integer
Return Me.InnerList.Add(value)
End Function 'Add
[/code]
Thanks again for all of your help, I really appreciate it!