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. Image for the cookie policy date

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

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?


1 Reply

GP Gnana Priya Namasivayam Syncfusion Team 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  
 
 


Loader.
Live Chat Icon For mobile
Up arrow icon