Babu Srinivasan
Babu Srinivasan

Reputation: 2389

Xamarin Forms: How to switch ViewModels?

Switched to Forms from MvvmCross (mvx). With Mvx, in the ViewModel code, I use ShowViewModel<MainViewModel>() to switch. How do I do that with Xamarin Forms?
Note: I don't want to add any code in the code-behind file.

Upvotes: 0

Views: 427

Answers (1)

Stephane Delcroix
Stephane Delcroix

Reputation: 16222

Xamarin.Forms is not an Mvvm library. It's a cross platform mobile development toolkit. If you choose to go Mvvm, it's totally supported (and encouraged) by Xamarin.Forms, and you're free to pick any Mvvm framework you want. Hopefully those framework will provide to navigate between ViewModels in one way or the other.

Upvotes: 2

Related Questions