GetDefaultEditorForType Method

Gets the default editor for a data type.
Public Shared Function GetDefaultEditorForType( _
   ByVal dataType As Type _
) As Type
public static Type GetDefaultEditorForType( 
   Type dataType


The type of the data to be edited.

Return Value

A type that derives from ValueEditor or null if no editor has been registered for the data type.

GetDefaultEditorForType returns the editor that will be used by default for the specified data type. ValueEditor maintains a static table that associates a data type with the default editor to use to edit that data type. This mapping is used by the controls that embedd editors in them like the XamDataGrid. XamDataGrid will use this table to determine which editor to use for each of its fields based on the field's data type. For example, for a field of Double type, the XamDataGrid will query this method to determine the editor to use for the field if none has been explicitly specified.

The data type to editor mapping is many to one mapping. That is multiple data types can be registered to make use of a single editor. However a single data type can not be mapped to multiple editors.

You can change the mappings using ValueEditor's RegisterDefaultEditorForType static method.


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