共用方式為


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

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

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

語法

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

參數

屬性值

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

例外狀況

例外狀況 條件
ArgumentNullException

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

ArgumentException

找不到 name。

.NET Framework 安全性

請參閱

參考

ModelMemberCollection<TItemType, TKeyType> 類別

Item 多載

Microsoft.Windows.Design.Model 命名空間

其他資源

WPF 設計工具擴充性