Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to get the screen position of visualElement in ListView?

$
0
0

I want to implement the popup dialog in a listview cell according to the Tap event. The tap event code is as following. My problem is I can't place the popup dialog in the right position of the clicked cell. Is there any way to get the screen position of the clicked element? If I can get the screen position I could calculate the popup dialog position among this element. If you has any other solution about this problem? Any other suggestion will be appreciated.

...
TapGestureRecognizer singleTap = new TapGestureRecognizer
{
NumberOfTapsRequired = 1
};
singleTap.Tapped += OnSingleTap;
this.GestureRecognizers.Add(singleTap);
...
void OnSingleTap(object sender, object args)
{
// in this event method, I can get bounds of this elenments, but I can't get the current element's Screen position. Is there any way to convert the
bounds position to screen position?
}


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>