.NET MAUI

  Platforms. This folder contains platform-specific initialization code files and resources. There are folders for Android, iOS, MacCatalyst, Tizen, and Windows. At runtime, the app starts up in a platform-specific way. Much of the start-up process is abstracted out by the MAUI libraries' internals, but the code files in these folders provide a mechanism for hooking up your own custom initialization. The important point is that when initialization is complete, the platform-specific code calls the MauiProgram.CreateMauiApp method, which then creates and runs the App object as described earlier. For example, the MainApplication.cs file in the Android folder, the AppDelegate.cs file in the iOS and MacCatalyst folder, and the App.xaml.cs file in the Windows folder all contain the overrides:

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();

 

posted @ 2024-02-02 14:51  有翅膀的大象  阅读(8)  评论(0编辑  收藏  举报