XamlType.LookupAllowedContentTypes 方法

定義

傳回型別的清單,這些型別可做為此 ContentPropertyXamlType 值。

protected:
 virtual System::Collections::Generic::IList<System::Xaml::XamlType ^> ^ LookupAllowedContentTypes();
protected virtual System.Collections.Generic.IList<System.Xaml.XamlType> LookupAllowedContentTypes ();
abstract member LookupAllowedContentTypes : unit -> System.Collections.Generic.IList<System.Xaml.XamlType>
override this.LookupAllowedContentTypes : unit -> System.Collections.Generic.IList<System.Xaml.XamlType>
Protected Overridable Function LookupAllowedContentTypes () As IList(Of XamlType)

傳回

可能內容型別的清單。

備註

當呼叫端從 AllowedContentTypes 取得值時,可以叫用這個方法。

針對 特定內容類型評估為 CanAssignTo 的類型,不會被視為多個型別。 AllowedContentTypes

預設實作 XamlType 可以使用 (ContentWrappersContentPropertyItemType) 的其他屬性來取得結果。 您也可以 Lookup 在此判斷中叫用上述屬性清單的覆寫。

如果您不依賴預設的內部 CLR 反映,並使用中繼資料或其他技術來報告類型的 XAML 類型系統資訊或架構資訊,請覆寫這個方法。

適用於