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.
- C#
- VB.NET
public class FontNameConverter : TypeConverter
Public Class FontNameConverter
Inherits 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 | ITypeDescriptorContext | 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 | Type | 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 | ITypeDescriptorContext | 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 | CultureInfo | A CultureInfo to use to perform the conversion |
| value | Object | The object to convert. |
Returns: Object. The converted object.
Throws:
- NotSupportedException The conversion cannot be completed.
GetStandardValues(context)
| Parameter | Type | Description |
|---|---|---|
| context | ITypeDescriptorContext |
Returns: StandardValuesCollection.
GetStandardValuesExclusive(context)
| Parameter | Type | Description |
|---|---|---|
| context | ITypeDescriptorContext |
Returns: Boolean.
GetStandardValuesSupported(context)
| Parameter | Type | Description |
|---|---|---|
| context | ITypeDescriptorContext |
Returns: Boolean.