时间:2011-01-06 18:32:36

标签: c# touch xamarin.ios xamarin.android

2 个答案:

答案 0 :(得分:2)

对于MonoDroid,有几个针对相同主题的StackOverflow Android问题,例如:

  

How to get the absolute coordinates of a view

建议使用View.GetLocationOnScreen(int[])View.GetLocationInWindow()

还有

  

mismatch of event coordinates and view coordinates in Android?

还建议使用View.GetLocationOnScreen()并获取默认显示的屏幕指标。

答案 1 :(得分:0)

对于Monotouch,您可以使用ConvertPointToView,它是所有UIViews的一部分。它会将点转换为您传入的视图的正确坐标。

相关问题