Skip to main content

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

Instance member FontNameConverter()

Initializes a new instance of the FontNameConverter class.

Methods

Instance member CanConvertFrom(context, sourceType)

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

ParameterTypeDescription
contextITypeDescriptorContextAn 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 .
sourceTypeTypeThe type you wish to convert from.

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

Instance member ConvertFrom(context, culture, value)

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

ParameterTypeDescription
contextITypeDescriptorContextAn 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 .
cultureCultureInfoA CultureInfo to use to perform the conversion
valueObjectThe object to convert.

Returns: Object. The converted object.

Throws:

Instance member GetStandardValues(context)

ParameterTypeDescription
contextITypeDescriptorContext

Returns: StandardValuesCollection.

Instance member GetStandardValuesExclusive(context)

ParameterTypeDescription
contextITypeDescriptorContext

Returns: Boolean.

Instance member GetStandardValuesSupported(context)

ParameterTypeDescription
contextITypeDescriptorContext

Returns: Boolean.