Xamarin Portable OnAppearing() XAML page loading

HI there, i am using the Xamarin Forms Portable project and i am using the MVVM method. Right now I am stuck. I want to build a LOADING page. So when the (Custom) Page starts it must load a XAML page loading and when the Loading (call to a webservice) is done the XAML page loading must be set to visible = false.

I have the next code that wont work:

protected override async void OnAppearing()
{

    base.OnAppearing();

    var page = Navigation.PushAsync(new ActivityIndicatorPage());

    await Task.Delay(1000);

    BindingContext = new ProductViewModel(_ProductId);

}

So how do i Call the 'ActivityIndicatorPage' Page and then set it to invisible after the 'BindingContext = new ProductViewModel(_ProductId);' call is done.

Thanx.

Sign In or Register to comment.