async void OnItemSelected(object sender, SelectedItemChangedEventArgs args) { Nutrient item; if (args.SelectedItem is Tuple <int, string> tuple) { item = Nutrient.Get(tuple.Item1); } else { return; } await Navigation.PushModalAsync(new NavigationPage(new ItemDetailPage(item))); // Manually deselect item. //ItemsListView.SelectedItem = null; }
public ItemDetailPage(int id) { InitializeComponent(); InitPage(Nutrient.Get(id)); }