コード例 #1
0
        private async Task Redirect(string type)
        {
            var param = new NavigationParameters();
            var key   = "productType";

            if (type == "beras")
            {
                param.Add(key, AllProducts.ElementAt(0));
            }
            else if (type == "durian")
            {
                param.Add(key, AllProducts.ElementAt(1));
            }
            else if (type == "kakao")
            {
                param.Add(key, AllProducts.ElementAt(2));
            }
            else
            {
                param.Add(key, AllProducts.ElementAt(3));
            }

            await _navigationService.NavigateAsync("ProdukDetailPage", param);
        }