//控件的绝对位置
TreeView tr = (TreeView)sender;
GeneralTransform generalTransform = tr.TransformToVisual(null);
Point point = generalTransform.Transform(new Point());
//控件的相对位置
Point p = new Point();
p.X = e.GetPosition(tr).X;
p.Y = e.GetPosition(tr).Y;
//得到鼠标的实时位置
Point p = new Point();
p.X = e.GetPosition(tr).X + point.X;
p.Y = e.GetPosition(tr).Y + point.Y;