Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why haven't we implemented auto-discover for Nav/Pages? #1722

Open
JerryNixon opened this issue Dec 17, 2019 · 1 comment
Open

Why haven't we implemented auto-discover for Nav/Pages? #1722

JerryNixon opened this issue Dec 17, 2019 · 1 comment

Comments

@JerryNixon
Copy link
Member

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?

@tibitoth
Copy link
Contributor

Maybe .NET Native reflection limitations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants