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

PushModalAsync and PushAsync

$
0
0

I'm trying to display a list of states from a web service. When a user clicks my "Login Help" button I call...

Navigation.PushModalAsync(new LoginHelp());

After reading some info on PushModalAsync and PushAsync by AdamKemp (http://blog.adamkemp.com/2014/09/navigation-in-xamarinforms_2.html) I decided I'd like to just use PushAsync instead, so I changed it to

Navigation.PushAsync(new LoginHelp());

However, after doing so the very next page no longer loads the data from the web service and displays it in the listview correctly on the next page. The page loads, along with a label, but my listview that actually displays all the states is empty. Swapping it back to Navigation.PushModalAsync(new LoginHelp()); solves the problem and the listview on the Login Help page is loaded with the data.

I stepped through the code many time and it's calling the service, adding it to the binding context and doing everything it should...the page just doesnt load the data in the listview.

I can keep using PushModalAsync, but I'm really curious why it doesn't work.

I'm new to Xamarin and Xamarin.Forms so go easy on me.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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