public RecipeDetailPage(Recipe selectedRecipe)
        {
            InitializeComponent();

            var viewModel = new RecipeDetailViewModel(selectedRecipe, Navigation);

            BindingContext = viewModel;
        }
Exemplo n.º 2
0
        public RecipeDetailPage(Guid recipeId)
        {
            InitializeComponent();

            ViewModel      = new RecipeDetailViewModel(recipeId);
            BindingContext = ViewModel;

            editRecipe.Clicked += async(sender, args) => await Navigation.PushAsync(new RecipeEditPage(ViewModel.RecipeId));
        }