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

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com 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
)

Parameters

parent
Type: System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection

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

name
Type: System.String

The name of this collection.

value
Type: System.Object

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

Exception Condition
ArgumentNullException

parent or name is null.

ArgumentException

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
Show: