The argument of the ItemClick
Event
you are handling contains a lot of useful stuff, such as the position of the clicked item in the ListView
s Adapter
, but also the View
and its contents.
So if you know the ListViewItem
view contains a TextView
you can in your ItemClick
handler have code like follows, which extracts the content of it:
lstText.ItemClick += (sender, args) =>
{
var userIdTextView = args.View.FindViewById<TextView>(Resource.Id.sUserId);
var userId = userIdTextView.Text;
}