Windows apps
Collapse the table of content
Expand the table of content
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.

ExpandableObjectConverter Class

Provides a type converter to convert expandable objects to and from various other representations.

For a list of all members of this type, see ExpandableObjectConverter Members.


[Visual Basic]
Public Class ExpandableObjectConverter
   Inherits TypeConverter
public class ExpandableObjectConverter : TypeConverter
public __gc class ExpandableObjectConverter : public TypeConverter
public class ExpandableObjectConverter extends TypeConverter

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


This class adds support for properties on an object to the methods and properties provided by TypeConverter. To make a type of property expandable in the PropertyGrid, specify this TypeConverter for standard implementations of GetPropertiesSupported and GetProperties.

Note   You should never access a type converter directly. Instead, call the appropriate converter by using TypeDescriptor. For more information, see the examples in the TypeConverter base class.

For more information about type converters, see the TypeConverter base class and Implementing a Type Converter.


[Visual Basic, C#, C++] The following example converts a variable of type Margins to a string variable.

[Visual Basic] 
Dim strM As String
strM = "1,2,3,4"
Dim m = New System.Drawing.Printing.Margins(1, 2, 3, 4)

string strM="1,2,3,4";
System.Drawing.Printing.Margins  m= new System.Drawing.Printing.Margins(1,2,3,4);

String* strM = S"1,2,3,4";
System::Drawing::Printing::Margins* m = new System::Drawing::Printing::Margins(1,2,3,4);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Namespace: System.ComponentModel

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System (in System.dll)

See Also

ExpandableObjectConverter Members | System.ComponentModel Namespace

© 2017 Microsoft