Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two ViewModels for a single View at MvvmCross

Is it possible to use two ViewModels for a single View at MvvmCross?

The reason is an existing Core library which already has navigation in place and a working app on top of it. Now I need to create another app and leverage the only View for two ViewModels (in core lib there is one view navigated to another using ShowViewModel and I just want to stay at the same view and change my datacontext).

Thank you for any suggestions.

like image 687
Alexey Strakh Avatar asked Oct 10 '13 03:10

Alexey Strakh


1 Answers

Yes

  • you can continue to use ShowViewModel and change the way navigation happens by overriding the presenter - see Custom Presenters in the wiki
  • or you can use a different navigation mechanism entirely - there's nothing forcing you to use ShowViewModel
like image 147
Stuart Avatar answered Sep 24 '22 13:09

Stuart