【问题标题】:Get doubletap coordinates in c# windows phone 8在 c# windows phone 8 中获取双击坐标
【发布时间】:2013-09-24 17:47:26
【问题描述】:

当我在画布上的某个地方双击时,我正在尽力获取我的手指双击位置的坐标,我该如何完成呢?我有一个这样的双击方法:

        private void App_DoubleTap(object sender, System.Windows.Input.GestureEventArgs e)
    {
        //Get coordinates(left and top) of where i doubletapped
    }

请帮助我,并提前非常感谢!:)

【问题讨论】:

    标签: c# canvas windows-phone-8 windows-phone


    【解决方案1】:

    要获取相对于页面的位置,请使用:

    Point point=e.GetPosition(this);
    

    要获得相对于画布的位置(在 Canvas 上重复双击事件),请使用:

    point = e.GetPosition(sender as UIElement);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多