Xamarin.Forms MessagingCenter

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

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.



Got any Xamarin.Forms Question?