Say I have a StackPanel that gets dynamically filled with copy, changing the Y position of elements inside it. I have a specific element within that StackPanel that I want t
The methods in the link you posted should work fine, provided you call them correctly.
You need to call them with the correct UIElement - in this case, using element1 to the RootVisual will give you the full position of element1
:
var transform = element1.TransformToVisual(Application.Current.RootVisual as FrameworkElement);
Point absolutePosition = transform.Transform(new Point(0, 0));