ListBox ctlList = sender as ListBox
;
UIElement elem = (UIElement)ctlList.InputHitTest( e.GetPosition( ctlList
) );
while ( elem != ctlList
)
{
if ( elem is ListBoxItem
)
{
rd = ((ListBoxItem)elem).Content as Record;
// Handle the double click here
break
;
}
elem = (UIElement)VisualTreeHelper.GetParent( elem
);