Use GeneralTransform to get the position of the UI Element:
1 GeneralTransform objGeneralTransform = myObj.TransformToVisual(Application.Current.RootVisual as UIElement);
2 Point point = objGeneralTransform.Transform(new Point(0, 0));
3 double myObjTop = point.Y;
4 double myObjLeft = point.X;
No comments:
Post a Comment