Binding commands in MVVM is a bit tricky, but if understood correctly then of a great use.
A simple command can be bound using a Delegate and the Icommand Interface to handle the function that is to be executed.
First of all we need to know what a Delegate is?
A Delegate is a reference to a function. A Delegate is much useful in an event execution. Although this example deals with a custom Delegate we can use a predefined delegates present in the System Namespace.
Secondly and most importantly, ICommand interface and its implementation. ICommand can be found in System.Windows.Input namespace. ICommand interface provides all the method signatures that are used to execute a command in MVVM. Continue reading