Calling methods in your View from your ViewModel using Action-Invokes

Executing ViewModel methods from Xamarin Forms Pages is easy, but how can Page methods be called inside ViewModels?

In Xamarin Forms, if you bind ViewModel Commands to Page Buttons, all of the logic from the button click action takes place in the ViewModel. The problem is that the ViewModel doesn’t have access to the Xamarin Forms controls, and so it’s difficult to access functions of Views from your ViewModel. Delegates are not commonly…

--

--

Developers building things, on here to share knowledge. Featured blog for PlanetXamarin.com github.com/saamerm linkedin.com/in/saamer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store