Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

ContextActions for listview in forms 1.3 is superb

$
0
0

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.

Bye

Alessandro Facchini
Italy


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>