We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Display popup using x, y coordinates of label inside listview on label tap

Thread ID:

Created:

Updated:

Platform:

Replies:

149703 Dec 6,2019 02:27 AM UTC Dec 6,2019 05:26 AM UTC Xamarin.Forms 1
loading
Tags: SfListView
Vincent Finley
Asked On December 6, 2019 02:27 AM UTC

I have a list view control which I'm using to display a list of items. I have a label in each row for "more options" (3 vertical dots) that when tapped, I want to display a popup to the bottom right of the label.

This works for the first item in the listview, but if I click the label in the second row, third row, etc--I can only get the coordinates of the first row's label

         private async void TapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            double y = ((Label)sender).Y;
            double x = ((Label)sender).X;

            ViewModel.ResultViewQuestionnaireVersion = (int)((TappedEventArgs)e).Parameter;
            ResultsOptionsPoup.ShowRelativeToView(ResultsViewContent, RelativePosition.AlignBottomLeft, x + 20, y + 20);
        }

In the above code, y and x are always the position of the first row's label.  Any ideas?


Gnana Priya Namasivayam [Syncfusion]
Replied On December 6, 2019 05:26 AM UTC

Hi Vincent,  
   
   
Thank you for using Syncfusion products.  
 
We have already documented your requirement “to display pop-up layout on tap based on the x & y co-ordinates” from our side. We have attached the sample and documentation link for your reference, Kindly refer it from following link. 
 
 
  
Please let us know if you need any further assistance. 
 
Regards,  
Gnana Priya N  
 
 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon