XamlTypeTypeConverter.ConvertFrom 方法

定義

使用指定的內容,嘗試將指定的物件轉換為 XamlType

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

格式內容,提供正在叫用此轉換器之環境的相關資訊。

culture
CultureInfo

特定文化特性 (Culture) 資訊。

value
Object

要轉換的物件。

傳回

轉換的物件。

例外狀況

無法轉換 value

備註

類別 XamlTypeTypeConverter 只會將 的 XamlTypeString 實例轉換成 (或 XamlType) 。 其他類型的 value 擲回例外狀況。

適用於