FontConverter.FontNameConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) FontConverter.FontNameConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) FontConverter.FontNameConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) FontConverter.FontNameConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) Method

定義

將指定的物件轉換成轉換子的原生型別。Converts the given object to the converter's native type.

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object

參數

context
ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext

ITypeDescriptorContext,可以用來擷取環境的其他資訊,而這個轉換子就是從這個環境叫用的。An ITypeDescriptorContext that can be used to extract additional information about the environment this converter is being invoked from. 這可能是 null,所以您要隨時檢查。This may be null, so you should always check. 此外,內容物件上的屬性可能會傳回 nullAlso, properties on the context object may return null.

culture
CultureInfo CultureInfo CultureInfo CultureInfo

要用於執行轉換的 CultureInfoA CultureInfo to use to perform the conversion

value
Object Object Object Object

要轉換的物件。The object to convert.

傳回

轉換的物件。The converted object.

例外狀況

無法完成轉換作業。The conversion cannot be completed.

適用於

另請參閱