Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ListViewItem.Index属性获取ListView控件中项的从零开始的索引。现在我需要 a 中某些项目的索引ListViewGroup,而不是整个控件。可能吗?
ListViewItem.Index
ListView
ListViewGroup
您可以在组中找到它的索引,如下所示:
ListViewItem item = /* certain item in a ListviewGroup */; var index = item.Group.Items.IndexOf(item);