ListViewItem.Index 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得控制項目 ListView 的零基索引。
public:
property int Index { int get(); };
[System.ComponentModel.Browsable(false)]
public int Index { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Index : int
Public ReadOnly Property Index As Integer
屬性值
控制項內ListView.ListViewItemCollectionListView的零為基礎索引,若項目未與ListView控制項相關聯,則為 -1。
- 屬性
備註
你可以利用這個特性來判斷該項目是否與 ListView 控制項相關聯,以及判斷它在 ListView.ListViewItemCollectionListView中的位置。