I went through the official docs, but I still need to know the in-depth use of AppShell.xaml and the App.xaml files and how they differ from each other in the MAUI.
PS: This post is intended to act like a documentation in future for beginners struggling with MAUI.
AppShell provide the navigation for the app. The visual hierarchy of a .NET MAUI Shell app is described in the subclassed Shell class, which the project template names AppShell. A subclassed Shell class consists of three main hierarchical objects and they are all in the AppShell.xaml file:
From MS documentation:
App.xaml and App.xaml.cs:
- App.xaml is where you declare resources that are used across the app.
- App.xaml.cs is the code-behind file for App.xaml. Like all code-behind pages, it contains a constructor that calls the InitializeComponent method. You don't write the InitializeComponent method. It's generated by Visual Studio, and its main purpose is to initialize the elements declared in the XAML file.
- App.xaml.cs is the entry point for your app.