Exemplo n.º 1
0
        private void InitPage(Nutrient nutrient)
        {
            if (nutrient == null)
            {
                _nutrient = Nutrient.GetNew();
            }
            else
            {
                _nutrient = nutrient.Clone();
            }

            AddComponentsAsGrid();
            MessagingCenter.Subscribe <ItemDetailPage, Nutrient>(this, "RemoveNutrient", async(obj, item) =>
            {
                await App.Database.DeleteItemAsync(_nutrient.Id);
            });
            BindingContext = this;
        }