Өзгерту

Бөлісу құралы:


FontTypeConverter.ConvertTo Method

Definition

Converts a GlyphRun to an object of the 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

An object that provides contextual information.

culture
CultureInfo

The language and culture that are used during the conversion.

value
Object

The object you want to convert.

destinationType
Type

The type that you want value converted to.

Returns

The new Object of the designated type. As implemented in this class, this must be a Uri. It expresses the uniform resource identifier (URI) of the font subset that is used by the value parameter.

Exceptions

The destinationType is not a type that value can be converted to.

The context is null.

The value is null.

An error occurs when serializing the glyph run.

Remarks

As implemented in this class, value must be a GlyphRun.

As implemented in this class, destinationType must be a Uri or the NotSupportedException is thrown.

The culture parameter is not used. See Notes for Inheritors.

Notes to Inheritors

Override this method to provide your own conversion. Use the culture parameter to specify the language and culture. Use the context parameter to extract additional information about the environment from which this converter is invoked. This parameter can be null; therefore, always check it. Also, properties on the context object can return a null reference (Nothing).

Applies to