Skip to content

Instantly share code, notes, and snippets.

@detroitpro
Created January 14, 2015 19:39
Show Gist options
  • Save detroitpro/c0701f4b306177c6b80b to your computer and use it in GitHub Desktop.
Save detroitpro/c0701f4b306177c6b80b to your computer and use it in GitHub Desktop.
Xamarin Forms 1.3 Context Action
//------ Creating Contact Action 1 Start --------//
var moreAction = new MenuItem { Text = "More" };
moreAction.SetBinding (MenuItem.CommandParameterProperty, new Binding ("."));
moreAction.Clicked += async (sender, e) => {
await Task.Run (() => {
var mi = ((MenuItem)sender);
Debug.WriteLine ("More Context Action clicked: " + mi.CommandParameter);
});
};
ContextActions.Add (moreAction);
//------ Creating Contact Action 1 Start --------//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment