WPF 4触摸事件得到一个缩放手势中心 [英] WPF 4 touch events getting the center of a pinch gesture

查看:1121
本文介绍了WPF 4触摸事件得到一个缩放手势中心的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是.NET 4 Beta 2的触摸库和我试着去实现我的WPF应用程序缩放功能。

I am using the .net 4 beta 2 touch libraries, and Im trying to implement a zooming feature in my WPF application.

我可以得到缩放工作得很好,但我要的是放大的缩放手势的中心,我看不出如何在API的任何东西做到这一点。

I can get the zooming working just fine, but what I want is to zoom in on the center of the pinch gesture, and I cannot see anything in the API's about how to accomplish this.

有一些露出2个触点用捏的手势,这样我可以让他们的中心是方法或属性?

Is there some methods or properties that expose the 2 contacts being using in the pinch gesture so that I can get the center of them?

编辑:

使用我只是调查了 GetIntermediateTouchPoints TouchEventArgs 这似乎并没有给我我想要的东西。

I just investigated using the GetIntermediateTouchPoints method of TouchEventArgs which did not seem to give me what I want.

非常感谢$的方法b $ b选中

Thanks a lot Mark

推荐答案

原来,我的属性就在我所有的面前后沿。

Turns out that the properties I was after was right in front of me all along.

Manipulation2DDeltaEventArgs 类有 OriginX OriginX 属性特定捏手势的中点,所以我只是使用其所有的好:)

the Manipulation2DDeltaEventArgs class has OriginX and OriginX properties that specific the center point of the pinch gesture, so Im just using that and its all good :)

这篇关于WPF 4触摸事件得到一个缩放手势中心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆