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

Is it correct to use Xamarin.Forms namespace in a ViewModel

$
0
0

I am a newbie in Xamarin.Forms and the architect in our team mentioned, if we wanted a clean architecture, we must avoid using Xamarin.Forms in ViewModel as it references Views directly so it actually doesn't decouple.

But in the most of the tutorials, guides I don't see this being followed.

Can anyone suggest what's the correct guideline, and how does it really support this decoupling? Does everyone follow the same?
Also, when I try to use buttonclick event via a Command class in the ViewModel, I can't use it without using Xamarin.Forms namespace.

How can I achieve pure decoupling without using the Command class?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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