使用AddManipulator触摸操作

时间:2012-12-12 07:54:51

标签: c# wpf

使用AddManipulator时,触摸路由到新操作?当我执行以下操作时,一切正常,但TouchLeave事件后仍会触摸。因此,例如,如果我做单个手指旋转,留下被触摸的元素并再次触摸它,它变成两个手指缩放。

private void HV3DTouchDown(object sender, TouchEventArgs e)
{
    Canvas canvas = sender as Canvas
    Manipulation.AddManipulator(canvas, e.TouchDevice.AsManipulator());
    e.Handled = true;
    CaptureTouch(e.TouchDevice);
}

private void HV3DTouchLeave(object sender, TouchEventArgs e)
{
    Canvas canvas = sender as Canvas
    Manipulation.RemoveManipulator(canvas, e.TouchDevice.AsManipulator());
    e.Handled = true;
    ReleaseTouchCapture(e.TouchDevice);
}

0 个答案:

没有答案