Forum Xamarin Xamarin.Forms

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

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)

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.

Sign In or Register to comment.