Created
June 23, 2013 09:50
-
-
Save damirarh/5844449 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}" | |
ItemClick="OnItemClick" /> |
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 ViewModel | |
{ | |
get { return DataContext as ViewModel; } | |
} | |
private void OnItemClick(object sender, ItemClickEventArgs e) | |
{ | |
ViewModel.ItemClicked(e.ClickedItem as string); | |
} |
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 void ItemClicked(string item) | |
{ | |
// react to the event | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment