Absolute Position ListBoxItem, Windows Phone 7

How can I get the absolute (X, Y) position of the ListBoxItem (top left corner) according to the entire ListBox and the visible area of ​​the ScrollViewer? It seems that in WP7 there is no version of TranslatePoint ().

+3
source share
1 answer

Find a way.

var selectedItem = listBox.ItemContainerGenerator.ContainerFromItem(listBox.SelectedItem) as ListBoxItem;
var transformToVisual = selectedItem.TransformToVisual(listBox);
var transform = transformToVisual.Transform(new Point(0, 0));
+5
source

All Articles