Share via


FontUnitConverter.ConvertTo 方法

定義

FontUnit 轉換成具有不同資料型別的物件。

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 實作的物件,提供型別轉換子內容的相關資訊。

culture
CultureInfo

CultureInfo,指定文化特性來表示 FontUnit (當它被適當表達時)。

value
Object

Object,表示要轉換的 FontUnit

destinationType
Type

Type,表示要轉換成的資料型別。

傳回

Object,表示轉換的值。

備註

ConvertTo使用 方法,將 參數所 value 指定的 轉換為 FontUnit 具有 參數所 destinationType 指定資料類型的物件。

注意

String.Empty如果參數包含 null ,則會 value 從這個方法傳回 。 String.Empty如果 Type 參數所 value 指定的 屬性 FontUnit 包含 值 FontSize.NotSet ,也會傳回 。

注意

這個方法只能將 轉換成 FontUnit 字串。

適用於

另請參閱