Version

ConvertTo(ITypeDescriptorContext,CultureInfo,Object,Type) Method

Converts PaintElement instances into InstanceDescriptor objects.
Syntax
'Declaration
 
Public Overloads Overrides Function ConvertTo( _
   ByVal context As ITypeDescriptorContext, _
   ByVal culture As CultureInfo, _
   ByVal paintItem As Object, _
   ByVal destinationType As Type _
) As Object
public override object ConvertTo( 
   ITypeDescriptorContext context,
   CultureInfo culture,
   object paintItem,
   Type destinationType
)

Parameters

context
An ITypeDescriptor that provides context when this method is called within the context of a TypeConverter.
culture
Identifies the Culture for the type to convert to.
paintItem
An instance object to convert.
destinationType
The type to convert an object into.

Return Value

An object of the destinationType, or null if that conversion wasn't possible.
Remarks

This method converts objects of PaintElement into InstanceDescriptor objects that are used during serialization and for the design-time environment. Call the CanConvertTo(ITypeDescriptorContext,Type) method to ascertain whether conversion between two Types is supported.

Since types in .NET vary on culture, two types having the same name with different cultures are distinct types. Make sure that when converting types the culture argument to this method matches the culture of the Infragistics assemblies installed on the machine.

Additionally, the method requires that the paintItem parameter be of type PaintElement. The destinationType must be of type InstanceDescriptor. If either of these criteria are not met, then this method falls back on the base class implementation, if any.

Please consult the documentation for InstanceDescriptor for more details on the usage of this helper class.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, 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