Xamarin.Forms has a built-in messaging mechanism to promote decoupled code. This way, view models and other components do not need to know each other. They can communicate by a simple messaging contract.
There a basically two main ingredients for using the MessagingCenter
.
Subscribe; listen for messages with a certain signature (the contract) and execute code when a message is received. A message can have multiple subscribers.
Send; sending a message for subscribers to act upon.