public RecipeDetailPage(Recipe selectedRecipe)
        {
            InitializeComponent();

            var viewModel = new RecipeDetailViewModel(selectedRecipe, Navigation);

            BindingContext = viewModel;
        }
예제 #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));
        }