Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Last active December 24, 2019 09:28
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/51db613c655b539a89145c0ab2172f36 to your computer and use it in GitHub Desktop.
Save jfversluis/51db613c655b539a89145c0ab2172f36 to your computer and use it in GitHub Desktop.
public partial class FavFightersView : ContentPage
{
public FavFightersView()
{
InitializeComponent();
BindingContext = new FavFightersViewModel();
}
// !!!!! This is the important part, right here !!!!!
void SwipeItemView_Invoked(System.Object sender, System.EventArgs e)
{
var selectedFighter = ((SwipeItemView)sender).BindingContext as Fighter;
DisplayAlert("Added favorite", $"{selectedFighter.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