I have a ListBox with a rather simple ItemTemplate defined - containing a TextBlock and a Button. This displays like expected, but there is a problem though. When I click the content of the ListBoxItem, i.e. the text or the button, the line doesn't get selected in the ListBox. If I click the blank parts of the line it does. I'd like the ListBoxItem to be selected when I click anywhere on the line. What's needed to achieve this?
<ListBox ItemsSource="{Binding SomeElements}">
<ListBox.ItemTemplate>
<DataTemplate>
<ListBoxItem Selected="ListBoxItem_Selected">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Title}"></TextBlock>
<Button>Click</Button>
</StackPanel>
</ListBoxItem>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>