RegisterDefaultEditorForType Method

Registers a default editor for a data type.
Public Shared Sub RegisterDefaultEditorForType( _
   ByVal dataType As Type, _
   ByVal editorType As Type, _
   ByVal overlayExisting As Boolean _
public static void RegisterDefaultEditorForType( 
   Type dataType,
   Type editorType,
   bool overlayExisting


The type of the data to be edited.
The type of the editor to be used - must derive from ValueEditor.
If true will overlay any previously registered editor for the data type.

Use RegisterDefaultEditorForType method to change or register default editor that will get used for a data type. The editorType parameter specifies the type of the editor. Controls like XamDataGrid making use of this default editor mapping infrastructure will create instances of this editor type to edit fields of dataType. The editorType must be a type that derives from ValueEditor class.

You can register custom data types and custom editors as well. You can register a custom data type to make use of an existing editor or you can change the editor of an already registered data type to make use of a custom editor or both.

See GetDefaultEditorForType for further information.

Note: You can register a different editor for a primitive type and Nullable version of the primitive type. If no editor is explicitly registered for the Nullable version of the type then the editor for the type will be used.


Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also