XamlType.LookupKeyType 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
protected:
virtual System::Xaml::XamlType ^ LookupKeyType();
C#
protected virtual System.Xaml.XamlType LookupKeyType();
abstract member LookupKeyType : unit -> System.Xaml.XamlType
override this.LookupKeyType : unit -> System.Xaml.XamlType
Protected Overridable Function LookupKeyType () As XamlType
XamlType字典使用索引鍵類型的 物件,如果 null
這個 XamlType 不代表字典,則為 。
您可以呼叫 來 KeyType 叫用這個方法。
預設實作可以使用 CLR 反映概念,例如使用 和 ParameterInfo 來檢查 Add
方法 MethodInfo ,以及檢查 BaseType 並嘗試該處的相同邏輯。
如果您想要 KeyType 使用不同的邏輯,請覆寫這個方法。 不會傳回 的 LookupCollectionKind 案例應該傳回 null
XamlCollectionKind.Dictionary 。
產品 | 版本 |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |