One of the most complicated aspects of writing an MVVM based Xamarin.Forms application is navigation. Not only is navigation specific to a Page instance, but each Page can have its own modal and non-modal navigation stacks. On top of that, the INavigation interface has a PushAsync which can only be used in a NavigationPage. If it’s not used in a NavigationPage, an exception is thrown. PushModalAsync can be used with any Page, but provides no hardware mechanism to go back on iOS which traps your users. Start throwing in MasterDetailPages, TabbedPages, or even TabbedPages with nested NavigationPages and things start to get pretty crazy. Now imagine trying to manage all those complexities from within a ViewModel where you have no reference or knowledge of the current Page or the target Page.
Join Brian Lagunas in this deep dive session on using the navigation features of Prism for Xamarin.Forms to simplify the navigation code in your ViewModels to one line of code. You’ll not only learn how to navigate from one page to another, but you’ll learn how to pass parameters, cancel navigation, clean up your ViewModels, respond to the Sleep and Resume application lifecycle events, deep link into your application, and much more.