Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TypeDescriptor.AddEditorTable Method

Adds an editor table for the given editor base type.

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

public static void AddEditorTable(
	Type editorBaseType,
	Hashtable table
)

Parameters

editorBaseType
Type: System.Type

The editor base type to add the editor table for. If a table already exists for this type, this method will do nothing.

table
Type: System.Collections.Hashtable

The Hashtable to add.

The AddEditorTable method adds an editor table for the given editor base type. Typically, editors are specified as metadata on a component. However, if no metadata for a requested editor base type can be found on the component, the associated TypeDescriptor will search an editor table for the editor type, if one can be found. Once an editor table has been added to a type descriptor, it cannot be removed and is owned by the type descriptor. The type descriptor may freely make modifications to this table.

The format for an editor table uses data types as keys and editors as values. The value portion of an entry in the table represents an editor instance. It can have one of three values. If it contains a string, the type descriptor will assume this is a fully qualified name of a type, and then load the type for the object. If it contains a type, an instance of this type will be created to obtain an editor. Finally, the value portion may contain an actual editor instance. If the type descriptor resolves an editor to an instance, it will store the instance back into the table for future use.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft