Skip to content

Instantly share code, notes, and snippets.

@kevingosse
Created January 2, 2018 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevingosse/1bf82c4a4972e139584768df4e6c0b12 to your computer and use it in GitHub Desktop.
Save kevingosse/1bf82c4a4972e139584768df4e6c0b12 to your computer and use it in GitHub Desktop.
<ListBox x:Name="HistoryList" ItemsSource="{Binding Path=History}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<i:InvokeCommandAction Command="{Binding Path=OpenCommand}" CommandParameter="{Binding Path=SelectedItem.Item2, ElementName=HistoryList}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Item1}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment