Created
June 23, 2013 10:58
-
-
Save damirarh/5844618 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ListView IsItemClickEnabled="True" | |
ItemsSource="{Binding Items}"> | |
<i:Interaction.Triggers> | |
<i:EventTrigger EventName="ItemClick"> | |
<i:InvokeCommandAction Command="{Binding ItemClickedCommand}" /> | |
</i:EventTrigger> | |
</i:Interaction.Triggers> | |
</ListView> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ViewModel() | |
{ | |
Items = new List<string> {"Item 1", "Item 2", "Item 3"}; | |
ItemClickedCommand = new DelegateCommand(ItemClicked); | |
} | |
public void ItemClicked() | |
{ | |
// react to the event | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment