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

auto call a method without pressing a button

$
0
0

Is there any way that i can auto call the following without getGamesButton?

var getGamesButton = new Button{ Text = "Get Games" };

            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);
                });
            };

Viewing all articles
Browse latest Browse all 58056

Trending Articles



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