あなたのXamlファイルは次のようになります
<ListBox ItemsSource="{Binding MultipleCopyList, Mode=TwoWay}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding HeaderText,Mode=TwoWay}" Grid.Column="1" />
</StackPanel>
</DataTemplate>
</ListBox>
あなたのトリガーは次のように見えます
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<cmd:EventToCommand Command="{Binding DataContext.MouseClickCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter ="{Binding}" />
</i:EventTrigger>
</i:Interaction.Triggers>
そしてあなたのViewModelは次のように見えます
private RelayCommand<StateForm> _MouseClickCommand;
public RelayCommand<StateForm> MouseClickCommand
{
get {
if (_MouseClickCommand == null)
{
_MouseClickCommand = new RelayCommand<StateForm>(e => MouseClick(e));
}
return _MouseClickCommand; }
set
{
_MouseClickCommand = value;
RaisePropertyChanged("MouseClickCommand");
}
}
private void MouseClick(StateForm e)
{
Your Code goes Here
}