The entry point view, also referred to as the application's MainPage, is set during the initialization of a Xamarin.Forms app. Usually, it is set in the constructor of the App class. We will be creating MainView through the resolver we created earlier and wrapping it in NavigationPage to enable platform-specific navigation on the device that the app runs on. We could have used Shell as well, but in this case, there are no reasons to use it:
- Open the App.xaml.cs file.
- Resolve an instance to a MainView class by using Resolver and storing it in a variable called mainView.
- Create a new instance of NavigationPage by passing the mainView variable as a constructor argument and assigning it to a variable called navigationPage.
- Assign the navigationPage.Navigation property to the static Navigation property, which is of the ViewModel type. This property will be used when navigating between pages later on.
- Assign the navigationPage variable to the...