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

PushModalAsync - Understanding

$
0
0

What am I doing wrong here ? It goes into an endless loop of the BusyPage popup and disappear repeatedly.

` protected async override void OnAppearing ()
{
base.OnAppearing ();

        await Navigation.PushModalAsync (new BusyPage ());

        await Task.Delay (5000);  // I have a call to REST web service and BindingContext = someObject, replaced with Delay(5000) - same result

        await Navigation.PopModalAsync ();

    }

My BusyPage looks like this public class BusyPage : ContentPage
{
public BusyPage ()
{
BackgroundColor = Color.Transparent;
this.Content = new StackLayout {
Children = {
new Label { Text = "Loading", BackgroundColor = Color.Transparent, HorizontalOptions = LayoutOptions.Center },
new ActivityIndicator {
IsVisible = true,
IsRunning = true,
}
},
VerticalOptions = LayoutOptions.CenterAndExpand,
BackgroundColor = Color.Transparent
};
}
}
`


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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