public ProductoNuevoPage(Producto producto) { try { BindingContext = vModel = new ViewModels.Productos.ProductoViewModelCRUD(); vModel.IsNew = false; vModel.Item = producto; InitializeComponent(); cta_eliminar.IsEnabled = true; cta_agregar.IsEnabled = true; } catch (Exception ex) { string messag = ""; Exception er = ex; while (er != null) { messag += er.Message + "!!!"; er = er.InnerException; } DisplayAlert("Error", messag, "OK"); } }
//public Producto Item { get; set; } public ProductoNuevoPage() { try { BindingContext = vModel = new ViewModels.Productos.ProductoViewModelCRUD(); vModel.Item = new Producto { }; vModel.IsNew = true; InitializeComponent(); } catch (Exception ex) { string messag = ""; Exception er = ex; while (er != null) { messag += er.Message + "!!!"; er = er.InnerException; } DisplayAlert("Error", messag, "OK"); } }