예제 #1
0
        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;
        }
예제 #2
0
 public ItemDetailPage(int id)
 {
     InitializeComponent();
     InitPage(Nutrient.Get(id));
 }