//EVENT HANDLERS protected override void OnNavigatedTo(NavigationEventArgs e) { //Calls the base version base.OnNavigatedTo(e); //Casts the parameters to the recipe type recipe = e.Parameter as RecipeModel; this.DataContext = recipe; //Sets the image on the page recipeImg.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(recipe.Picture); }
private void acceptButton_Click(object sender, RoutedEventArgs e) { var recipe = new RecipeModel(titleBox.Text, ingredients, instructions); Frame.Navigate(typeof(MyRecipesPage), recipe); }