Description
Today, we must register each page in the AppShell on startup such as:
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute(nameof(DetailsPage), typeof(DetailsPage));
}
However, it would be nicer to align with how ASP.NET Core routing works and make it an attribute on the page. Since this would require assembly scanning today, this should be implemented as source generators for optimal performance.
(Public) API Changes
[Route(nameof(DetailsPage))]
public partial class DetailsPage : ContentPage
{
}
This would generate code necessary to register the DetailsPage with the route of DetailsPage.
Usage Scenarios
See above :)
Backward Compatibility
Would be an added option and an upgrade from the existing mechanism.
Difficulty
Medium
Description
Today, we must register each page in the AppShell on startup such as:
However, it would be nicer to align with how ASP.NET Core routing works and make it an attribute on the page. Since this would require assembly scanning today, this should be implemented as source generators for optimal performance.
(Public) API Changes
This would generate code necessary to register the
DetailsPagewith the route ofDetailsPage.Usage Scenarios
See above :)
Backward Compatibility
Would be an added option and an upgrade from the existing mechanism.
Difficulty
Medium