This documentation is archived and is not being maintained.

CollectionEditor Class

Provides a user interface that can edit most types of collections at design time.

Namespace:  System.ComponentModel.Design
Assembly:  System.Design (in System.Design.dll)

'Declaration
Public Class CollectionEditor _
	Inherits UITypeEditor
'Usage
Dim instance As CollectionEditor

Notes to Inheritors:

This editor can edit collections that have an Item property. The editor can determine the type of the collection from the Item property, if it exists. If the collection does not have this property, or if you want to provide collections of more than one type, you can override certain protected members of this class to customize the editor to support other types of collections.

The following code example uses an EditorAttribute to associate the CollectionEditor with a property.

<EditorAttribute(GetType(System.ComponentModel.Design.CollectionEditor), GetType(System.Drawing.Design.UITypeEditor))>  _
Public Property testCollection() As ICollection
   Get 
      Return Icollection
   End Get 
   Set
      Icollection = value
   End Set 
End Property 
Private Icollection As ICollection

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: