public RecipeDetailPage(Recipe selectedRecipe) { InitializeComponent(); var viewModel = new RecipeDetailViewModel(selectedRecipe, Navigation); BindingContext = viewModel; }
public RecipeDetailPage(Guid recipeId) { InitializeComponent(); ViewModel = new RecipeDetailViewModel(recipeId); BindingContext = ViewModel; editRecipe.Clicked += async(sender, args) => await Navigation.PushAsync(new RecipeEditPage(ViewModel.RecipeId)); }