Using Shell
The INavigation
interface and NavigationPage
offer basic navigation functionality. Relying solely on them would require us to create complex navigation mechanisms by ourselves. Fortunately, .NET MAUI provides built-in page templates to choose from, which can deliver various navigation experiences.
As shown in the class diagram in Figure 5.2, there are built-in pages available for different use cases. All these pages – TabbedPage
, ContentPage
, FlyoutPage
, NavigationPage
, and Shell
– are derived classes of Page
:
Figure 5.2: Class diagram of the built-in pages in .NET MAUI
ContentPage
, TabbedPage
, and FlyoutPage
can be used to create various UIs per your requirements:
ContentPage
is the most commonly used page type and can include any layout and view elements. It is suitable for single-page designs.TabbedPage
can be used to host multiple pages. Each child page can be selected by a series of tabs, located at either the top or...