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

Base VM type mismatch in ViewLocator #225

Open
stevemonaco opened this issue Jul 25, 2023 · 0 comments
Open

Base VM type mismatch in ViewLocator #225

stevemonaco opened this issue Jul 25, 2023 · 0 comments

Comments

@stevemonaco
Copy link

Is your feature request related to a problem? Please describe.

When doing ViewLocator lookups, if you happen to derive a VM from the MVVM Framework's base type instead of ViewModelBase, ViewLocator.Match will fail causing ViewLocator.Build to never happen. It's not the most straightforward thing to debug from personal experience.

Describe the solution you'd like

Remove ViewModelBase from the project templates, but first check if people are actually commonly extending this with properties/methods instead of leaving it empty. If it's empty, then there's no added benefit over deriving directly from the MVVM framework's base type as you're tightly coupled to this.RaiseAndSetIfChanged, etc anyways.

Describe alternatives you've considered

Change ViewLocator.Match to match against the Mvvm Framework's base INPC type instead of ViewModelBase

Additional context

No response

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

1 participant