HTF do you get the topleft coords of a UI element?
I got this code
after a bit of googling but it doesn't recognise Application.Current.RootVisual
In the good old days of hwnds and windows api this was a piece of piss, even windows forms has properties for top and left.
I got this code
Code:
GeneralTransform objGeneralTransform = myObj.TransformToVisual(Application.Current.RootVisual as UIElement); Point point = objGeneralTransform.Transform(new Point(0, 0)); double myObjTop = point.Y; double myObjLeft = point.X;
In the good old days of hwnds and windows api this was a piece of piss, even windows forms has properties for top and left.
Comment