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.
我在列表视图中有一个图像列表,以前显示的唯一图像是 pdf。这意味着我可以有效地处理双击事件以打开 pdf。现在我有一个不同的要求来显示文件夹中其他文件的一些占位符缩略图。listView_DoubleClick 事件中有没有办法确定在图像列表中单击了哪些图片,这样我就可以确定如何处理该事件?
谢谢你的时间
确定单击了哪个项目,然后当您拥有一个ListViewItem实例时,您可以检查该ListViewItem.ImageIndex属性。
ListViewItem
ListViewItem.ImageIndex
编辑: ListView.SelectedItem和/或ListView.SelectedItems你的朋友在这里。
ListView.SelectedItem
ListView.SelectedItems