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

定義

嘗試將指定的物件轉換為 FontFamily 的執行個體。Attempts to convert a specified object to an instance of FontFamily.

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

參數

context
ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext

描述類型的內容資訊。Describes the context information of a type.

culture
CultureInfo CultureInfo CultureInfo CultureInfo

轉換期間應遵守的特定文化特性資訊。Cultural-specific information that should be respected during conversion.

value
Object Object Object Object

要轉換的物件。The object being converted.

destinationType
Type Type Type Type

這個 FontFamily 執行個體轉換成的型別。The type that this instance of FontFamily is converted to.

傳回

從已轉換的 FontFamily 執行個體建立的物件。The object that is created from the converted instance of FontFamily.

例外狀況

發生在 valuedestinationType 不是有效轉換型別的情況。Occurs if value or destinationType is not a valid type for conversion.

發生在 valuedestinationTypenull 的情況。Occurs if value or destinationType is null.

備註

FontFamilyConverter支援在String類型之間進行轉換。FontFamilyConverter supports conversion to and from the String type.

適用於