ReferenceConverter Class

Definition

Provides a type converter to convert object references to and from other representations.

public class ReferenceConverter : System.ComponentModel.TypeConverter
Inheritance
ReferenceConverter
Derived

Inherited Members

System.ComponentModel.TypeConverter

System.Object

Remarks

The ReferenceConverter is typically used within the context of sited components or a design environment. Without a component site or a usable ITypeDescriptorContext, this converter is of little use.

This converter converts a reference of an object that implements the IComponent interface and displays its properties in the Properties window.

For more information about type converters, see the TypeConverter base class and How to: Implement a Type Converter.

Note

You should never create an instance of the ReferenceConverter class. Instead, call the GetConverter method of the TypeDescriptor class. For more information, see the examples in the TypeConverter base class.

This class provides the IsValueAllowed method to check whether a particular value can be added to the standard values collection. If you do not want to add the value to the collection, override this method.

Constructors

ReferenceConverter(Type)

Initializes a new instance of the ReferenceConverter class.

Methods

CanConvertFrom(ITypeDescriptorContext, Type)

Gets a value indicating whether this converter can convert an object in the given source type to a reference object using the specified context.

ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)

Converts the given object to the reference type.

ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)

Converts the given value object to the reference type using the specified context and arguments.

GetStandardValues(ITypeDescriptorContext)

Gets a collection of standard values for the reference data type.

GetStandardValuesExclusive(ITypeDescriptorContext)

Gets a value indicating whether the list of standard values returned from GetStandardValues(ITypeDescriptorContext) is an exclusive list.

GetStandardValuesSupported(ITypeDescriptorContext)

Gets a value indicating whether this object supports a standard set of values that can be picked from a list.

IsValueAllowed(ITypeDescriptorContext, Object)

Returns a value indicating whether a particular value can be added to the standard values collection.