private void Recipes_SelectionChanged(object sender, MouseButtonEventArgs e)
 {
     if (ItemsControl.ContainerFromElement(sender as ListBox, e.OriginalSource as DependencyObject) is ListBoxItem item && item.Content is OverviewModel model)
     {
         mainWindow.ChangeContentControl(new AddRecipeControl(model.RecipeID, mainWindow));
     }
 }
Пример #2
0
 private void Close_Click(object sender, RoutedEventArgs e)
 {
     mainWindow.ChangeContentControl(new RecipesOverviewControl(mainWindow));
 }
Пример #3
0
 private void ControlClose()
 {
     this.DataContext = null;
     mainWindow.ChangeContentControl(new EvaluationOverviewControl(mainWindow));
 }