Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

MVVM Design Question

$
0
0

I'm designing an app and trying to follow MVVM as much as I can with this one.

I currently have an OrderPage with an OrderViewModel

The OrderPage Has 3 ConentView's:
HeaderView
AddressesView
ProductsView

With a status bar showing which is Active/Inactive/Complete.

The OrderViewModel contains Properties for HeaderViewModel, AddressesViewModel and ProductsViewModel.

Each view in OrderPage is bound to the corresponding ViewModel Property in OrderViewModel

OrderPage contains a "Save and Continue" button which basically determines which View to show while calling a save method in each view model.

My question is, is having nested ViewModels a viable solution with MVVM or would it be better to make each ViewModel have it's own content page?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>