我们如何在WPF 4.5应用程序中使用Windows 8触摸手势(双击,按住)? [英] How can we use Windows 8 Touch Gestures (Double Tap, Hold) in WPF 4.5 apps?

查看:100
本文介绍了我们如何在WPF 4.5应用程序中使用Windows 8触摸手势(双击,按住)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在设计一个WPF 4.5应用程序,该应用程序计划在鼠标+键盘和触摸模式下都可以正常运行.

Hello, I'm designing a WPF 4.5 application that is planned to work well in both mouse + keyboard and touch modes.

我正在尝试遵循Windows 8触摸指南,但WPF 4.5不支持某些触摸手势,例如Double&等等.

I'm trying to follow the Windows 8 Touch Guide but WPF 4.5 doesn't support some of touch gestures like Double Tap & Hold.

我已经尝试过Josh Blake出色的触摸手势库(Blake.NUI),但是我发现它的工作速度太慢,而实际上很难依靠它.

I've tried Josh Blake's excellent touch gestures library (Blake.NUI) but I find it to work way too slow while that it's really hard to rely upon it.

同时,Windows 8具有C ++ API,可用于新的触摸手势,例如Double&保持,所以问题是我们如何在WPF 4.5应用程序中重新使用这些触摸手势事件?

At the same time, Windows 8 has C++ APIs for new touch gestures like Double Tap & Hold, so the question is how we can re-use these touch gestures events in WPF 4.5 apps?

PS只是为了回答有关我们为什么开发非地铁应用程序的问题,让我注意到该应用程序使用本地SQL Server 2012 Express和本地Web服务(不,它需要它们都在本地运行,而不是远程运行),这使得无法将该应用程序发布到Windows 店铺.

PS Just to answer a question on why we develop non-Metro app, let me note that this app uses local SQL Server 2012 Express and local Web Service (and no, it needs them both to run local, not remotely), which makes it impossible to publish this app to Windows Store.

Neocyte Labs的所有者和创始人

Owner & Founder, Neocyte Labs

推荐答案

我想知道是否您所有问题的答案可能是 Microsoft Surface ?

MS最近发布了用于Windows 7的 SDK .我强烈建议您下载并试用.

MS recently released the SDK for Windows 7. I HIGHLY recommend you download it and try it out.

您将ScrollViewer替换为SurfaceScrollViewer等,您的应用程序将启用触摸和弹力功能,而无需进行任何其他工作.对于支持触摸功能的设备来说,这是一个巨大的进步,而且我也不会梦想以其他任何方式做到这一点.

You replace your ScrollViewer for a SurfaceScrollViewer, etc, and your application becomes touch and bouncy enabled without any further work. It is a HUGE advance for touch enabled devices, and I would not dream of doing it any other way.

 

<s:SurfaceScrollViewer>
    <StackPanel>
        <Rectangle Width="125" Height="95" Fill="Cyan" />
        <Rectangle Width="150" Height="100" Fill="Red" />
        <Rectangle Width="135" Height="115" Fill="Blue" />
        <Rectangle Width="145" Height="120" Fill="Green" />
    </StackPanel>
</s:SurfaceScrollViewer>

  

  

我相信您也应该能够在Windows 8应用程序中使用它吗?

I believe you should be able to use this in a Windows 8 application too?

 

有关Surface Touch支持的更多信息

More on Surface Touch Support

 

此致,
皮特

Regards,
Pete


这篇关于我们如何在WPF 4.5应用程序中使用Windows 8触摸手势(双击,按住)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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