private void DeleteIngredientExecute(object obj) { if (obj is Ingredient ingredient) { RecipeIngredients.Remove(ingredient); } }
async Task DeleteIngredient() { try { RecipeIngredients.Remove(SelectedIngredient); OnPropertyChanged(nameof(CanRecipeSubmit)); } catch (Exception ex) { //_logger.Error("Got exception", ex); await Application.Current.MainPage.DisplayAlert("Błąd", ex.Message, "Ok"); } }
public void DeleteIngredient() { try { RecipeIngredients.Remove(SelectedIngredient); NotifyOfPropertyChange(() => CanAddRecipeSubmit); } catch (Exception ex) { _logger.Error("Got exception", ex); MessageBox.Show(ex.Message, ex.GetType().ToString()); } }
public void RemoveRecipeIngredient(RecipeIngredient recipeIngredient) { RecipeIngredients.Remove(recipeIngredient); }