I want to get the coordinates (rectangle bounds: x, y, width and height) of the selected item in the listview relative to the screen (assume the listview fills the whole screen), so that I can create an object at that location and animate it to display some details of the selected item in my Xamarin.Forms app.

listview in xaml:

<ListView ItemTapped="ItemTapped" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0.5, 0.5, 1.0, 1.0"> <ListView.ItemTemplate> <DataTemplate> <ViewCell Height="50"> <AbsoluteLayout> <Label Text="{Binding Info}" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0.1, 0.5, 0.7, 0.5"/> </AbsoluteLayout> </ViewCell> </DataTemplate> </ListView.ItemTemplate> </ListView>

c# code for ItemTapped event:

void ItemTapped(object sender, EventArgs args) { var listView = (ListView)sender; // the listview var selectedItem = args.Item; // the selected item // need to get selected item coordinates for the animation var selectedItemBounds = ... ... }

Eventually I want to create somehting like this in Xamarin.Forms with a listview (the number of objects in the listview varies):