Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145286 | Jun 15,2019 08:42 PM UTC | Jun 17,2019 10:36 AM UTC | Xamarin.Forms | 1 |
![]() |
Tags: SfPopup |
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"));
}
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.