Skip to content

Instantly share code, notes, and snippets.

@damirarh
Created June 23, 2013 11:46
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 damirarh/5844738 to your computer and use it in GitHub Desktop.
Save damirarh/5844738 to your computer and use it in GitHub Desktop.
<Page.Resources>
<b:NameScopeBinding x:Key="ListView" Source="{Binding ElementName=ListView}" />
</Page.Resources>
<ListView x:Name="ListView"
SelectionMode="Single"
IsItemClickEnabled="True"
ItemsSource="{Binding Items}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="ItemClick">
<i:InvokeCommandAction Command="{Binding ItemClickedCommand}"
CommandParameter="{Binding Source.SelectedItem, Source={StaticResource ListView}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</ListView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment