Both ViewModel
and Model will have the ViewModelBase as the base class. ViewModelBase is
nothing but the class will just notify property changes to the View through the
INotifyPropertyChanged interface. Instead of inheriting the
INotifyPropertyChanged interface to both ViewModel and Model. It has been used only
in the ViewModelBase.

One interesting
aspect of ViewModelBase is that it provides the ability to verify that a
property with a given name actually exists on the ViewModel object. The below
code adds this useful support to MVVM.

ViewModel will
have the observablecollection of elements to update the View with the Model
class. It always serves the data binding
between View and Model. That means ViewMode acts as a DataBinder or Converter
to communicate the information between View to Model through public properties
and Delegate commands. As this class class is separated from the View (UI),
these classes are relatively straightforward to unit tests.

The above class
contains the ObservableCollection of Model class which relatively updates the
view with the respective information.

DelegateCommand:-

It enables the
user to hook up UI interactions with code without tightly coupling with two.
The controls in the UI aren’t intimately aware of the command logic they are
connected with, and the command logic is not aware of the controls it will be
associated with.

Basically
RoutedCommands works great in certain scenarios, and are prevalent in WPF. The
thing is, routed commands are not always great fit for MVVM development. Because
if we used the RoutedCommand, we need to use a CommandBinding somewhere in the
UI in order to connect a VisualElement to the respective command. So we would
likely stick the usage the RoutedCommands in MVVM.

But with the
help of DelegateCommand everything is simple. It will have CanExecute and
Execute callbacks to achieve this. It executes the different method in the
ViewModel.

It will execute
the Remove action from the connected observable collection. That means , it
just Remove the selected item from the collection. As ObservableCollection is
ICollectionChanged interface, it updates the View at the time when collection
modified in the ViewModel.