Hello,
When you create an empty MAUI app with the .NET MAUI App project template, the AppShell class will be created as well. Shell reduces the complexity of app development by providing the fundamental features that most apps require. In a Shell app, pages can be created on demand in response to navigation. And you could create Shell flyout, Shell tabs or Shell pages.
For more details, see .NET MAUI Shell overview - .NET MAUI | Microsoft Learn
App class is derived from Application class. In addition to loading application theme, you could also set the App lifecycle event by overriding the CreateWindow
method in this class. See App lifecycle - .NET MAUI | Microsoft Learn
I want to add a setting to the application so that the user can determine which page will be loaded as the "main" when the application is launched.
When you open the App class, you can see MainPage = new AppShell();
, you can set the main page like the following: App.Current.MainPage = new OtherPage();
(You can create a new class that shows other pages)
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.