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

Page Navigation - Recommended Method

$
0
0

I'm working on my first Xamarin Forms application (iOS and Android) and so far whenever I've had to change pages, I just do so from the code behind file. While my application works thus far, I feel like this is wrong as the application gets bigger and there are API calls between pages, commands, etc. Specifically because I'm having a problem where I have a button that calls a command (which calls a REST API in the ViewModel) and has an event handler to change the page in the code behind.

I know you can pass the Navigation stack to the ViewModel but is this the recommended method? Does it matter at all? I'm really curious what the "official" way to do this is and how problems like the one I'm facing should be handled.

Thanks in advance!


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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