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

MVVM Best Practices

$
0
0

Hi guys,

I'm trying to build my app using MVVM. When it comes to displaying data, everything goes well, I have a Page with its View Model and a number of Views which share the same ViewModel where all the logic is done in the ViewModel.

However when I'm not sure what is the best approach when you have a form. I have a page, with a view which contains a number of entries and a button, the button will send the data to the view model and via the Command parameter. What if the Command Method (within the ViewModel) wants to return something back to the View (such as incorrect parameters) and the view will have to display an alert message for example? How will the ViewModel communicate with the View?

Thanks
Shaun


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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