共用方式為


ModelMemberCollection<TItemType, TKeyType>.Item 屬性 (TKeyType)

在集合中搜尋具有指定索引鍵的項目,如果找到就傳回該項目。

命名空間:  Microsoft.Windows.Design.Model
組件:  Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)

語法

'宣告
Public ReadOnly Default Property Item ( _
    value As TKeyType _
) As TItemType
    Get
public TItemType this[
    TKeyType value
] { get; }
public:
property TItemType default[TKeyType value] {
    TItemType get (TKeyType value);
}
member Item : 'TItemType
JScript 不支援索引屬性。

參數

  • value
    型別:TKeyType
    要尋找之項目的索引鍵。

屬性值

型別:TItemType
具有指定索引鍵的 TItemType。如果找不到,這個屬性會擲回例外狀況。

例外狀況

例外狀況 條件
ArgumentNullException

value 為 nullNull 參照 (即 Visual Basic 中的 Nothing)。

ArgumentException

找不到 value。

.NET Framework 安全性

請參閱

參考

ModelMemberCollection<TItemType, TKeyType> 類別

Item 多載

Microsoft.Windows.Design.Model 命名空間

其他資源

WPF 設計工具擴充性