Si je les points sur Exécuter avec un paramètre de mon point de vueICommand.Execute méthode (Object)
GoToNextScreen.Execute(selectedSubMenuIndex);
et cela appelle une méthode dans mon ViewModel
private MvxCommand _goSecondCommand;
public IMvxCommand GoSecondCommand
{
get
{
_goSecondCommand = _goSecondCommand ?? new MvxCommand(DoGoSecond);
return _goSecondCommand;
//try to call a command that navigates
}
}
public void DoGoSecond()
{
ShowViewModel<OnlineGroceryShoppingViewModel>(); //action to go to the second view
}
mais il saute directement à DoGoSecond quand je passe à travers, comment puis-je accéder au paramètre passé, selectedSubMenuIndex, dans la méthode DoGoSecond?
PS, j'ai
var set = this.CreateBindingSet<HomeView, HomeViewModel>();
set.Bind(this).For(v => v.GoToNextScreen).To(vm => vm.GoSecondCommand);
set.Apply();
appelle si GoToNextScreen GoSecondCommand
u r mon héros! J'ai vu vos commentaires sur les forums Xamarin, comment puis-je devenir aussi sage que vous? Merci encore! –
Cire, décoller – Cheesebaron