Forum Xamarin Xamarin.Forms

ContextActions for listview in forms 1.3 is superb

Hi i just wanted to share this new AMAZING feature introduced with forms 1.3.

I just tested either in ios or in android and it works fine,

Basically in the cell constructor is enought to put code like this:

ContextActions.Add (new MenuItem () {
Text = "Delete",
IsDestructive = true,
Command = new Command (async(Object x) => {
await PerfromDeleteTasks();//....
Debug.WriteLine ("DELETE");


In ios this is "rendered" with the classical swipe to delete; in android instead the long press mechanism is in action so it's enough to hold a few seconds on a listview item to get the question whether or not delete the element.


Alessandro Facchini


Sign In or Register to comment.