The main navigation for this app will be tabs at the bottom of the screen. The app will have a fly-out menu with two options—Home and Gallery:
- In the Views folder in the GalleryApp project, create two new ContentPage files with XAML—one named MainView and one named GalleryView.
- At the root of the GalleryApp project, create a new ContentPage file named MainShell.
- Change the base class of MainShell to Shell instead of ContentPage. We need to do this in both MainShell.xaml and MainShell.xaml.cs.
- Add MainView to the Shell object wrapped in a ShellContent object.
- Add GalleryView to the Shell object using the ContentTemplate property of ShellContent. Use the DataTemplate mark-up extension. This will load GalleryView when the user taps the tab, instead of when Shell is loading, as is the case with MainView:
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http...