Esempio n. 1
0
        private void GoPedido(Object sender, EventArgs e)
        {
            TemplatePedido place           = (TemplatePedido)sender;
            Pedido         ItemSelecionado = (Pedido)((TemplatePedido)sender).BindingContext;

            //EMPILHA PAGINA POVOADA COM ITEM SELECIONADO
            App.Current.MainPage.Navigation.PushAsync(new PedidoView(ItemSelecionado));
        }
Esempio n. 2
0
        private void UpdatePedidos(PedidoEntregaModel pedidos)
        {
            List <Pedido> ListaPedidos = new List <Pedido>((IEnumerable <Pedido>)pedidos.pedidos);
            var           productTapGestureRecognizer = new TapGestureRecognizer();

            productTapGestureRecognizer.Tapped += GoPedido;


            for (int i = 0; i < ListaPedidos.Count; i++)
            {
                var item = new TemplatePedido();
                item.BindingContext = ListaPedidos[i];
                item.GestureRecognizers.Add(productTapGestureRecognizer);
                PedidosStackLayout.Children.Add(item);
            }
        }