Our app will spring to life in AppShell.xaml. We’ll be putting a few additional things there, but key for now is the ShellContent element
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />
As you can see there are three attributes: the Title, the ContentTemplate and the Route. The interesting ones are the latter two. We’ll talk about ContentTemplate in a bit. The Route speaks to the way navigation is performed in MAUI, and that is (surprise!) by using “routes” (you can think of them as URIs.) In this case, the Route couldn’t be simpler: we’re going directly to MainPage.
Let’s turn to MainPage. We’re going to start by noting that MainPage is a contentPage – the most common sort of page for MAUI. You can add controls, but like in Xamarin.Forms the page can only have one control, but of course layout controls can have child controls, so that is not burdensome.
Continue reading