如何在winrt捏/缩放手势中获得手指/触摸点

时间:2014-02-13 09:31:18

标签: windows-8 windows-runtime winrt-xaml

我正在使用GestureRecognizer来操纵WinRT中的触摸事件而且我还将以下触摸设置添加到GestureRecognizer

GestureListener.GestureSettings = GestureSettings.ManipulationScale |
                                          GestureSettings.ManipulationScaleInertia;

所以我怀疑如何从这些事件中获得最新的两个接触点(手指位置)。我不是想捏合和缩放图像。我需要通过这些事件获得这个捏/缩放手指的位置。从哪里可以找到这些手指位置。

1 个答案:

答案 0 :(得分:0)

您可以使用PointerPressed事件。

private void UIElement_PointerPressed(object sender, PointerRoutedEventArgs e)
{
    e.GetCurrentPoint(UIElement);   //UIElement - the control on which touch will be made
}

事件将在触发时触发。 每次事件触发时,都可以存储该点,以便可以检索前两个点。