void t_GotFocus(object sender, RoutedEventArgs e)
{
var tb = sender as TextBox;
var gt = tb.TransformToVisual(null);
Point p = gt.Transform(new Point(0, 0));//控件相对于起始坐标(0,0)的位置
MessageBox.Show(p.X + " " + p.Y);
}
转载于:https://www.cnblogs.com/Kingly/archive/2012/07/10/2585012.html