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.ListViewItemCollection中ListView的位置。