XamlType.LookupItemType 方法

定義

傳回值,這個值提供此 XamlTypeItems 屬性的型別資訊。

protected:
 virtual System::Xaml::XamlType ^ LookupItemType();
protected virtual System.Xaml.XamlType LookupItemType ();
abstract member LookupItemType : unit -> System.Xaml.XamlType
override this.LookupItemType : unit -> System.Xaml.XamlType
Protected Overridable Function LookupItemType () As XamlType

傳回

集合中之項目型別的 XamlType 物件,如果此 XamlType 不表示集合,則為 null

備註

呼叫 即可叫 ItemType 用這個方法。

預設實作可以使用 CLR 反映概念,例如使用 和 ParameterInfo 來檢查 Add 方法 MethodInfo 、檢查 IsArray ,以及檢查 BaseType 和嘗試該處的相同邏輯。

如果您想要 ItemType 使用不同的邏輯,請覆寫此方法。 LookupCollectionKind傳回應該傳 XamlCollectionKind.Nonenull 的情況。

適用於