Binding XAML Controls Directly to the ViewModel Methods

When developing client-side XAML, MVVM pattern is commonly used. It means that the ViewModel business methos are bound to XAML View not by the events directly, but to the Commands that should be published by ViewModel.


In order to invoke a ViewModel method, you need to publish a command that is bound to control on one hand, and to the ViewModel method on the other hand from the command. This makes sure the code are working correctly. However, this implementation is usually uncomfortable and often wordy.


This post will show you a different approach to remove redundant code and to simplify things. This also ensures that the controls are not bound to the commonds, but tot the methods directly.

Read the rest of the post here:

Leave a Reply

Your email address will not be published. Required fields are marked *