I have hooked into the ListBoxItems' double-click event using the ff. code in my XAML:
<Style TargetType="{x:Type ListBoxItem}">
<EventSetter Event="MouseDoubleClick" Handler="onMouseDoubleClickOnListBoxItem" />
</Style>
The code for the handler is:
private void onMouseDoubleClickOnListBoxItem(object sender, MouseButtonEventArgs e)
{
Debug.Print("Going to select all.");
listBox.SelectAll();
Debug.Print("Selected all.");
}
When I run it, I see the debug output but the items do not all get selected on screen.