积极答复者
PointerPoint如何重新计算位置

问题
答案
-
Hi,
你可以通过TranformToVisual()方法,得到这个点到Canvas左上角的距离,处以你得到的距离,就是放大的倍数,之后可以用这个数据乘以你需要放大的坐标。
Aaron
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- 已标记为答案 Venlentinee 2013年4月21日 4:20
- 取消答案标记 Venlentinee 2013年4月21日 4:21
- 已标记为答案 Venlentinee 2013年4月22日 13:11
全部回复
-
Hi,
你可以通过TranformToVisual()方法,得到这个点到Canvas左上角的距离,处以你得到的距离,就是放大的倍数,之后可以用这个数据乘以你需要放大的坐标。
Aaron
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- 已标记为答案 Venlentinee 2013年4月21日 4:20
- 取消答案标记 Venlentinee 2013年4月21日 4:21
- 已标记为答案 Venlentinee 2013年4月22日 13:11
-
Hi,
你只能够通过GetCurrentPoint来得到坐标,而Pointer对象的引用我想是没有办法可以得到的。不过你为什么需要这个引用?我们可以用一些其他的替代方法。
Aaron
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.