DesignerOptionService.CreateOptionCollection Method (DesignerOptionService.DesignerOptionCollection, String, Object)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates a new DesignerOptionService.DesignerOptionCollection with the given name and adds it to the given parent.

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

protected DesignerOptionService.DesignerOptionCollection CreateOptionCollection(
	DesignerOptionService.DesignerOptionCollection parent,
	string name,
	object value


Type: System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection

The parent designer option collection. All collections have a parent except the root object collection.

Type: System.String

The name of this collection.

Type: System.Object

The object providing properties for this collection. Can be null if the collection should not provide any properties.

Exception Condition

parent or name is null.


name is an empty string.

The value parameter specifies an object whose public properties are used in the Properties collection of the option collection. The value parameter can be null if this options collection does not offer any properties. Properties are wrapped in such a way that passing anything into the component parameter of the PropertyDescriptor is ignored, and the value object is substituted.

.NET Framework
Available since 2.0
Return to top