Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of how to use MessagingCenter in Xamarin.Forms applications. -
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Xamarin.Forms;
namespace DemoMessagingCenter
public partial class ListPage : ContentPage
ObservableCollection<string> list = new ObservableCollection<string>();
public ListPage()
ListItem.ItemsSource = list;
MessagingCenter.Subscribe<Message>(this, "AddItem", message => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment