WPF中获得控件相对于控件的相对位置

原文: WPF中获得控件相对于控件的相对位置

GeneralTransform generalTransform = lstitem.TransformToAncestor(this.BackStack);
 Point point = generalTransform.Transform(new Point(0, 0));

point是获得控件 kstitem 相对于控件 this.BackStack 的相对位置

猜你喜欢

转载自www.cnblogs.com/lonelyxmas/p/9292376.html
今日推荐