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


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Converts a GlyphRun to an object of the specified type.

Namespace:   System.Windows.Xps.Serialization
Assembly:  ReachFramework (in ReachFramework.dll)

public override object ConvertTo(
	ITypeDescriptorContext context,
	CultureInfo culture,
	object value,
	Type destinationType


Type: System.ComponentModel.ITypeDescriptorContext

An object that provides contextual information.

Type: System.Globalization.CultureInfo

The language and culture that are used during the conversion.

Type: System.Object

The object you want to convert.

Type: System.Type

The type that you want value converted to.

Return Value

Type: System.Object

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.

Exception Condition

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.

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).

.NET Framework
Available since 3.0
Return to top