private void EditFoodMenuItem_Click(object sender, RoutedEventArgs e) { FoodWindow window = new FoodWindow(DataContext, (Food)FoodListView.SelectedItems[0]); window.ShowDialog(); UpdateFoodListView(); }
private void AddFoodButton_Click(object sender, RoutedEventArgs e) { FoodWindow window = new FoodWindow(this.DataContext); window.ShowDialog(); }