Xamarin.Forms MessagingCenter Unsubscribing


Example

When you no longer need to receive messages, you can simply unsubscribe. You can do it like this:

MessagingCenter.Unsubscribe<MainPage> (this, "Hi");

When you are supplying arguments, you have to unsubscribe from the complete signature, like this:

MessagingCenter.Unsubscribe<MainPage, string> (this, "Hi");