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

[Sample] How to set a VM to a UserControl #750

Open
agneszitte opened this issue Jun 7, 2024 · 0 comments
Open

[Sample] How to set a VM to a UserControl #750

agneszitte opened this issue Jun 7, 2024 · 0 comments

Comments

@agneszitte
Copy link
Contributor

agneszitte commented Jun 7, 2024

Discussed in unoplatform/uno#17032

Question from @ArchieCoder: in the reference samples that use MVVM, all the samples have pages with its corresponding VM. This works well with RouteMap + Navigation system. If I have a page that is more complex with some UserControls. If I want to have a VM for a UserControl. What is the trick to create a VM that resolves the dependencies in the constructor?

We should create a quick sample demonstrating the use of a UserControl-specific ViewModel (VM) with Dependency Injection (DI) and Binding, within the context of a parent ViewModel.
(See more details in the related discussion: unoplatform/uno#17032 and Discord thread).

@agneszitte agneszitte transferred this issue from unoplatform/uno Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant