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

Doesn't the following eShopContainers app break the MVVM pattern?

$
0
0

I was referring to a great PDF version of the enterprise patterns using Xamarin forms, but then I came across the following ViewModel which directly references the Xamarin forms namespace.(Line 12)

https://github.com/dotnet-architecture/eShopOnContainers/blob/dev/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/LoginViewModel.cs

The main reason it is used is for creating the command binding for the respective buttons. Is this supposed to be the right way of following the MVVM pattern? I thought Xamarin forms namespace should not be used in your ViewModels to avoid clean architecture.
Can you correct me if I am wrong? I always thought we have to create our own class that inherits from ICommand and provide its implementations of CanExecute and Execute.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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