MVVM communication styles

There are several ways to implement communication between view models. This example shows the different communication styles:

  • InterestedIn
  • MessageMediator

InterestedIn

The InterestedIn method in Catel is the easiest way to communicate between view models. This can be done by simply adding the InterestedInAttribute on top of a view model and override the OnViewModelPropertyChanged and OnViewModelCommandExecuted methods. 

MessageMediator

Thought more flexible, the MessageMediator technique requires more work because the developer is responsible for defining custom messages, registering and unregistering specific messages and sending the messages via the MessageMediator.

Screenshots