FontConverter.FontNameConverter

System.Drawing.FontConverter FontNameConverter

Namespace: System.Drawing

Assembly: System.Drawing.Managed (4.0.0.0)

FontNameConverter is a type converter that is used to convert a font name to and from various other representations. This API supports the product infrastructure and is not intended to be used directly from your code.

public class FontNameConverter : TypeConverter

Constructors

FontNameConverter()

Initializes a new instance of the FontNameConverter class.

Methods

CanConvertFrom(context, sourceType)

Determines if this converter can convert an object in the given source type to the native type of the converter.

Parameter
Type
Description

context

An ITypeDescriptorContext that can be used to extract additional information about the environment this converter is being invoked from. This may be , so you should always check. Also, properties on the context object may return .

sourceType

The type you wish to convert from.

Returns: Boolean. if the converter can perform the conversion; otherwise, .

ConvertFrom(context, culture, value)

Converts the given object to the converter's native type.

Parameter
Type
Description

context

An ITypeDescriptorContext that can be used to extract additional information about the environment this converter is being invoked from. This may be , so you should always check. Also, properties on the context object may return .

culture

A CultureInfo to use to perform the conversion

value

The object to convert.

Returns: Object. The converted object.

Throws:

GetStandardValues(context)

Parameter
Type
Description

Returns: StandardValuesCollection.

GetStandardValuesExclusive(context)

Parameter
Type
Description

Returns: Boolean.

GetStandardValuesSupported(context)

Parameter
Type
Description

Returns: Boolean.

Last updated

Was this helpful?