How to use BindingContext when the viewmodel has got DI property in the constructor? #2298
Unanswered
davecameos
asked this question in
Xamarin.Forms
Replies: 1 comment 1 reply
-
Don't manually define the BindingContext, use the ViewModelLocator instead |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I registered a service in RegisterTypes using Prism.DryIoc within App.xaml.cs
The view model is something like this:
When I try to bind the context in the corresponding view, the exception appears saying it cannot be used because the view model constructor is not parameterless.
How can I solve this? Thank you
Beta Was this translation helpful? Give feedback.
All reactions