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

This async method lacks 'await' operators and will run asynchronously

$
0
0
    Cant figure out how to get rid of the warning, any help appreciated.

ICommand refreshCommand;

    public ICommand RefreshCommand
    {
        get { return refreshCommand ?? (refreshCommand = new Command(async () => await ExecuteRefreshCommand())); }
    }

    public async Task ExecuteRefreshCommand()
    {
        if (IsBusy)
            return;

        IsBusy = true;

        // Refresh to this web page
        webView.Source = "https://www.google.com";

        webView.Navigated += (s, e) =>
        {
            IsBusy = false;
        };
    }

Viewing all articles
Browse latest Browse all 77050

Trending Articles



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