Is it possible to implement the ValueChanged event via MVVM?
To be clear, what I am asking for is whether or not there is a way to handle the value changed event (likely via a command) in the ViewModel and avoid having to implement a traditional event handler in the code-behind of the Window class.
You can disregard this question as I ended up implementing with an interaction trigger and it appears to be working as expected, thanks anyway.
I was looking for the same question and I found this Scott post.
I would like to know if it possible to "bind" the Clicked event to a method of my ViewModel class (linked trought the BindingContext) of a simple Syncfusion Button of Xamarin components.
Thank you.
You don't bind to the click event, bind to a command.
Then in your view model, define the command (you need an implementation of ICommand), in the constructor for the view model wire the command up to the method you want to call, then implement the method.
Thanks. It is the logical way to doit but in the documentation I saw the Clicked event and I don't noticed about the Command property.
Hi Asier,
Thank you Scott for sharing the knowledge.
We are pleased to hear that your query has been resolved. Please do not hesitate to reach out to us if you have any further questions or concerns. We are always happy to assist you.