var listviewItem = VisualContainer.Children.FirstOrDefault(x => x.BindingContext == e.ItemData) as ListViewItem;
if (listviewItem != null)
{
//// You can customize your code here.
}
|
private void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
{
if (e.ItemType != ItemType.Record)
{
return;
}
var listviewItem = VisualContainer.Children.FirstOrDefault(x => x.BindingContext == e.ItemData) as ListViewItem;
if (listviewItem != null)
{
//// You can customize your code here.
}
var itemIndex = (this.listView.BindingContext asContactsViewModel).Contactsinfo.IndexOf(e.ItemData as ContactInfo);
var visibleLine = this.listView.GetVisualContainer().ScrollRows.GetVisibleLineAtLineIndex(itemIndex);
var point = this.listView.Y + visibleLine.ClippedOrigin + visibleLine.Size;
if (point + 140 <= this.listView.Height + 25)
{
this.popupLayout.Show(this.listView.X, this.listView.Y + visibleLine.ClippedOrigin + visibleLine.ClippedSize + this.GetRelativeYPoint("top"));
}
else
{
this.popupLayout.Show(this.listView.X, point - this.GetRelativeYPoint("bottom"));
}
}
|
If I use grouping for the listview the demo doesn´t work. In the first group the y position is to high, in the second group it doesn´t work completely and depends on the scrolling position of the items and expand/collapsed state of the groups. Is there a solution with grouped items?