DynamicResourceExtensionConverter.ConvertTo Method (ITypeDescriptorContext, CultureInfo, Object, Type)

 

Converts the specified object to another type.

Namespace:   System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

[SecurityCriticalAttribute]
public override object ConvertTo(
	ITypeDescriptorContext context,
	CultureInfo culture,
	object value,
	Type destinationType
)

Parameters

context
Type: System.ComponentModel.ITypeDescriptorContext

An ITypeDescriptorContext object that provides a format context.

culture
Type: System.Globalization.CultureInfo

A CultureInfo object that specifies the culture to represent the number.

value
Type: System.Object

Value to be converted. This is expected to be type DynamicResourceExtension.

destinationType
Type: System.Type

Type that should be converted to.

Return Value

Type: System.Object

The returned converted object. Cast this to the requested type. Ordinarily this should be cast to InstanceDescriptor.

Exception Condition
ArgumentException

value could not be assigned as DynamicResourceExtension.

ArgumentNullException

value is null.

destinationType is expected to be type InstanceDescriptor; if not, then the implementation falls through to base (ConvertTo, which may throw an exception).

.NET Framework
Available since 3.0
Return to top
Show: