void ListView_ItemClick(object sender, ItemEventArgs e) { DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter; Element elem = dialogAdapter.ElementAtIndex(e.Position); if (elem != null && elem.Click != null) { elem.Click(sender, e); } }
bool ListView_ItemLongClick(AdapterView parent, View view, int position, long id) { DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter; Element elem = dialogAdapter.ElementAtIndex(position); /* TODO: FIX * if (elem != null && elem.LongClick != null) * elem.LongClick(parent, ); */ return(true); }
private void Initialize() { this.ItemClick += (sender, eventArgs) => { Element elem = _dialogAdapter.ElementAtIndex(eventArgs.Position); if (elem != null && elem.Click != null) { elem.Click(sender, eventArgs); } }; /* * this.ItemLongClick = delegate() { * Element elem = _dialogAdapter.ElementAtIndex(eventArgs.Position); * if (elem != null && elem.LongClick != null) * elem.LongClick(sender, eventArgs); * }; */ }