Executing code in DataContext
Introduce an ICommand-based property in the DataContext and bind it to the
Command
property of button-based controls. Third-party frameworks also support binding them to element's events.Support parameters which support data binding.
Commands can be bound to key and mouse gestures.