当双击ListView控件时,怎样获得双击的是那个Item
如题。 因为双击的并不一定选中了。
------解决方案--------------------在MouseDown事件中,通过鼠标位置来获得当前所点击的Item
private ListViewItem itmSelected = null;
//in mouse down event
itmSelected = yourListView.GetItemAt( e.X, e.Y );
//in double-click event
if( itmSelected != null )
{
//other operation here
}