How to connect View with ViewModel using Acr.XamarinForms

ErichBallesErichBalles USMember
edited November 2014 in Cross Platform with Xamarin

Hi everyone,

in my Xamarin Forms app I want to scan barcodes. In this thread https://forums.xamarin.com/discussion/21578/trying-to-use-zxing-barcode-scanner-in-a-forms-app-getting-error-about-startactivity someone suggested to use Acr.XamarinForms.

Now I tried to start by understanding the sample but i have the following problem:

In the sample they wire up the viewmodel with the corresponding view in this line of code:
Container = new ContainerBuilder() .RegisterMvvmComponents(typeof(App).GetTypeInfo().Assembly)

But I just dont understand how I can explicitly add a new Viewmodel and where the connection to the view is.

Any help is appreciated!
Thanks!

Best Answer

Answers

  • ErichBallesErichBalles USMember

    Ok thank you, I'm not sure if you should take it down, but at least document it somewhere. It took me hours of debugging but I still just didn't find it ;)

Sign In or Register to comment.