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

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com 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
)

Parameters

context
Type: System.ComponentModel.ITypeDescriptorContext

An object that provides contextual information.

culture
Type: System.Globalization.CultureInfo

The language and culture that are used during the conversion.

value
Type: System.Object

The object you want to convert.

destinationType
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
NotSupportedException

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

ArgumentNullException

The context is null.

ArgumentException

The value is null.

XpsSerializationException

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
Show: