Consider changing the names of the native app base types (MauiWinUIApplication, MauiApplication, MauiUIApplicationDelegate)
See original GitHub issueThese are the types in question for each platform:
- Windows (WinUI):
MauiWinUIApplication
- Android:
MauiApplication
- iOS/MacCatalyst:
MauiUIApplicationDelegate
Why change the names?
- The names are not consistent with each other.
- These type names are not usually seen by developers, so using up “good” names such as
MauiApplication
might be a “waste”. These types are typically used once per project in a file generated by the project template (i.e. the user doesn’t type it in) - This would mean “good” names such as
MauiApplication
could be used in more user-facing APIs that are more frequently worked on by developers, such as in the app’s startup code (which, in my experience, changes quite a lot over time)
Why not change the names?
- The name are consistent with the native base class names, which can be a benefit for someone familiar with the native architecture.
- This doesn’t preclude doing a rename, but perhaps the rename would be an “uglier” name that bears a resemblance to the native base class.
- The names are consistent with Xamarin.Forms (somewhat)
Note: This originally came up in this PR (and subsequent discussion in the PR).
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Consider changing the names of the native app base types ...
Consider changing the names of the native app base types (MauiWinUIApplication, MauiApplication, MauiUIApplicationDelegate) #4281. Sign in to view logs.
Read more >App lifecycle - .NET MAUI
NET MAUI raises cross-platform lifecycle events when an app transitions between its different execution states.
Read more >How do I fix below errors with MAUI start up app
Right click your WinUI project in your MAUI solution and choose Properties. Then on the Build tab change the target framework to x86,...
Read more >Troubleshoot known issues - .NET MAUI
NET Multi-platform App UI (.NET MAUI), and how you can solve or work around them. The .NET MAUI repository also details some known...
Read more >How do I change the app name for a .Net MAUI app?
Right click to your project > Properties > MAUI Shared > Application Title > Your title With spaces . Your project will still...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not really done. This issue is a follow-up from that PR where we wanted to consider any further unification or non-unification.
Considering the weight of this change to existing projects, we decided to leave it for NET6.
In .NET 7 we’ll aim to do more source generation of these boilerplate implementations so these aren’t as user facing. We can also consider obsoleting these in favour of a new name then (and making the obsolete ones subclass the new ones, and then remove them in net8).