Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Passing var from one page to another

$
0
0

I consumed from the web api, and have the following in my GamePage.cs,
getGamesButton.Clicked += async (sender, e) => {

                    var webService = new GameRepository ();
                    var webServiceCall = await webService.GetGamesAsync ();
                    Lv.ItemsSource= webServiceCall;

                    Xamarin.Forms.Device.BeginInvokeOnMainThread (()=>{
                        Console.WriteLine ("found size" + webServiceCall.Count);
                    });

                };
    Lv.ItemTemplate = new DataTemplate (typeof(TextCell));
        Lv.ItemTemplate.SetBinding (TextCell.TextProperty, "GameName");

        Lv.ItemSelected += (sender, e) => {
            var selectGame = (Game)e.SelectedItem;
            Navigation.PushAsync (new GameDetailPage());
        };

using Navigation.PushAsync (new GameDetailPage());, i open up another page with more game details, but how do i pass that information to the other page?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>