MVVM pattern is kind of now an essential of building a WPF application, a very rich implementation is of ICommand is DelegateCommand which came with Microsoft pattern and practice package enterprise library or prism framework also known as “Microsoft composite application block for WPF”. Bellow a simple implementation is given.
Bellow I have putdown the use of the DelegateCommand, note that this is not the class of prism, its hand written simple version, just named it DelegateCommand to make it looks like prism’s DelegateCommand.
Xaml use is just like before simple binding with command object.
Hope this helps, until next time, Chow.