corradocavalli / Corcav.Behaviors

Behaviors Plugin for Xamarin.Forms
53 stars 17 forks source link

argument exception adding behavior #21

Open lucamorelli opened 7 years ago

lucamorelli commented 7 years ago

Hi, I have a ViewModel based on MvvmLight ViewModelBase: In this viewmodel I have a list of objects and I need to call a method in the view model passing as parameter a value from the object in the list, just like in the demo, but when I set the CommandNameContext this way

CommandNameContext="{behaviors:RelativeContext MainContentPage}" I obtain this error message. System.ArgumentException: serviceProvider does not provide an IRootObjectProvider Am I missing something?

ihassantariq commented 7 years ago

same is happening with me. @lucamorelli are you able to find the solution? I know it is happening because [XamlCompilation(XamlCompilationOptions.Compile)] tag. If you have found something already, do let me know. 👍

kaktusas2598 commented 6 years ago

I am having exactly same issue. Is it solvable??