Template10
Template10 copied to clipboard
Why haven't we implemented auto-discover for Nav/Pages?
Right now you have to do this if you want to navigate to Settings
.
public override void RegisterTypes(IContainerRegistry container)
{
container.RegisterView<SettingsPage, SettingsPageViewModel>();
}
Even if all you are doing is this:
public override void RegisterTypes(IContainerRegistry container)
{
container.RegisterView<SettingsPage>();
}
I guess I have forgotten why we don't support navigating to a page by using a hunt for the type based on the key passed to the NavigationService
. I can't remember the reason we would not have done this and it seems like conventions-based should handle most use cases, which would make the RegisterTypes()
method considerably smaller/simpler/easier. It would also enable simple apps to just plug and play.
What am I missing?
Maybe .NET Native reflection limitations?