Hi, all!
I have a ListBox with Button in ItemTemplate. When I press a Button, some Command fired. I want the ListBox to fire SelectionChanged event when Button Click event happen. How shoult I fire ListBox SelectionChanged event and pass appropriate context?
<ListBox ItemsSource="{Binding SomeSource}" >
<ListBox.ItemTemplate>
<DataTemplate>
<Button Grid.Row="0" BorderThickness="0" Background="Transparent" HorizontalAlignment="Stretch">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cmd:EventToCommand Command="{Binding SomeCommand}" CommandParameter="{Binding}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
<Button.Template>
<ControlTemplate>
<TextBlock Text="{Binding Title}" />
</ControlTemplate>
</Button.Template>
</Button>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>