I have set Interaction.Triggers to ListBox and perform respective TargetedTriggerAction when \'SelectionChanged\' event occurs, like below.
<ListBox.Triggers>
<EventTrigger RoutedEvent="PreviewMouseDown">
<action:WorksheetListBoxAction />
</EventTrigger>
</ListBox.Triggers>
You can do the same without use of Interactivity.dll for event handling.
You can try something like this:
<Style TargetType="{x:Type ListBoxItem}">
<Style.Triggers>
<EventTrigger RoutedEvent="PreviewMouseDown">
<EventTrigger.Actions>
<action:WorksheetListBoxAction />
</EventTrigger.Actions>
</EventTrigger>
</Style.Triggers>
</Style>
you can do it the PreviewMouseDown event on the ListBoxItem
<ListBox ItemsSource="{StaticResource Data}">
<ListBox.ItemTemplate>
<DataTemplate>
<Button Name="TaskButton" Content="{Binding}" />
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<EventSetter Event="PreviewMouseDown"
Handler="ItemOnPreviewMouseDown" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
private void ItemOnPreviewMouseDown(
object sender, MouseButtonEventArgs e)
{
((ListBoxItem) sender).IsSelected = true;
}