Hi
I have nested listview in wpf. user can double click the listitem and open the item document. so I have ListView1_MouseDoubleClick and child listview 2 ListView2_MouseDoubleClick
but when user double click listview2 item , the listview1 also received mousedoubleclick event.
so... inorder to fix this problem as far as I know there are two solutions
A) -- add a bool flag and set to false
code:
Listview2_mousedoubleclick()
{
flag=true;
}
ListView1_mousedoubleclick()
{
if (flag==true) { flag=false;return}
}
B) -- Used VisualTreeHelper and analysis e.Source to find which one should response...
question: which way is better?