Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Created December 23, 2019 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfversluis/694dfd3c66ddb376361d68e17ade6547 to your computer and use it in GitHub Desktop.
Save jfversluis/694dfd3c66ddb376361d68e17ade6547 to your computer and use it in GitHub Desktop.
public partial class FavFightersView : ContentPage
{
public FavFightersView()
{
InitializeComponent();
BindingContext = new FavFightersViewModel();
// Catch the message here and show the alert
MessagingCenter.Subscribe<Fighter>(this, "Favorited", (f) =>
{
DisplayAlert("Added favorite", $"{f.Name} is added to your favorites!", "Thanks");
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment