У меня есть всплывающее окно, внутри которого есть элемент управления списком. Мне нужно связать событие щелчка левой кнопкой мыши с элементами в списке. Я написал
<Popup StaysOpen="False" IsOpen="{Binding VisibiltyAttr}" PlacementTarget="{Binding ElementName=InputText}" HorizontalAlignment="Center" AllowsTransparency="True" >
<ListBox ItemsSource="{Binding Collection}" SelectedIndex="{Binding Path=ItemIndex, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Bottom">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource AncestorType=ListBox},
Path=DataContext.SelectionCommand}" CommandParameter="{Binding}"></i:InvokeCommandAction>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Popup>
До того, как я добавил всплывающее окно, событие работало нормально.