편집

다음을 통해 공유


ImageSourceConverter.ConvertTo Method

Definition

Attempts to convert an instance of ImageSource to a specified type.

public:
 override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value, Type ^ destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object

Parameters

context
ITypeDescriptorContext

Context information used for conversion.

culture
CultureInfo

Cultural information that is respected during conversion.

value
Object

ImageSource to convert.

destinationType
Type

Type being evaluated for conversion.

Returns

A new instance of the destinationType.

Exceptions

value is null or is not a valid type.

-or-

context instance cannot serialize to a string.

Applies to