public Gastos(ref CompraDetailViewModel viewModel) { InitializeComponent(); BindingContext = this.viewModel = viewModel; TapGestureRecognizer tapEventSave = new TapGestureRecognizer(); tapEventSave.Tapped += BtnAgregar_Clicked; myImgAdd.GestureRecognizers.Add(tapEventSave); TapGestureRecognizer tapEventClose = new TapGestureRecognizer(); tapEventClose.Tapped += BtnCancelar_Clicked; myImgBack.GestureRecognizers.Add(tapEventClose); }
/// <summary> /// Método utilizado para resetear los controles a su estado inicial. /// </summary> private void resetearControles() { try { txtDescripción.Text = string.Empty; txtIdProveedor.Text = string.Empty; txtIdTipoProducto.Text = string.Empty; txtUnidades.Text = string.Empty; txtURL.Text = string.Empty; lblMontoTotal.Text = string.Empty; lblMontoPolipo.Text = string.Empty; _viewModel = new CompraDetailViewModel(); } catch (Exception ex) { throw ex; } }