So I've been seaching the web, but with all the updates to MVVMCross I cant figure out how to do this.
Its pretty straight forward to me that I can bind doing the following:
MvxFluentBindingDescriptionSet<PageOneView, PageOneViewModel> set = this.CreateBindingSet<PageOneView, PageOneViewModel>();
set.Bind(_HearingLossPickerView).To(vm => vm.HearingLoss);
set.Apply();
However, this creates a new instance of my viewmodel. I want to be able to use an existing viewmodel. I've tried just setting the DataContext, but no dice.
So essentially my flow looks like this.
ViewController (PagesViewController) -> View (PageOneView)
MainViewModel (PagesViewModel) -> SubViewModel (PageOneViewModel)
I'm able to create the PagesViewModel
like I did using the set and I want to essentially pass the PageOneViewModel
from PagesViewModel
to the PageOneView
Pretty basic stuff so if anyone could help that be amazballs.