Abstracting commands into the View Model is a valuable practice with XAML/MVVM projects. I get that. And, I see ICommand in in WinRT; but, how do we implement it? I haven’t found a sample that actually works. Anyone know?
Abstracting commands into the View Model is a valuable practice with XAML/MVVM projects. I
Share
My all time favorite has to be the DelegateCommand provided by the Microsoft Patterns and Practices team. It allows you to create a typed command:
It also provides a way to raise the CanExecuteChanged event (to disable/enable the command)
Here’s the code: