<small id='nEosb'></small><noframes id='nEosb'>

<legend id='nEosb'><style id='nEosb'><dir id='nEosb'><q id='nEosb'></q></dir></style></legend>

        • <bdo id='nEosb'></bdo><ul id='nEosb'></ul>
        <tfoot id='nEosb'></tfoot>
        <i id='nEosb'><tr id='nEosb'><dt id='nEosb'><q id='nEosb'><span id='nEosb'><b id='nEosb'><form id='nEosb'><ins id='nEosb'></ins><ul id='nEosb'></ul><sub id='nEosb'></sub></form><legend id='nEosb'></legend><bdo id='nEosb'><pre id='nEosb'><center id='nEosb'></center></pre></bdo></b><th id='nEosb'></th></span></q></dt></tr></i><div id='nEosb'><tfoot id='nEosb'></tfoot><dl id='nEosb'><fieldset id='nEosb'></fieldset></dl></div>

        有没有一种简单的方法来处理 WPF4 中的 Flick 等触摸事件?

        时间:2023-10-24

          <tbody id='HNicj'></tbody>
        <i id='HNicj'><tr id='HNicj'><dt id='HNicj'><q id='HNicj'><span id='HNicj'><b id='HNicj'><form id='HNicj'><ins id='HNicj'></ins><ul id='HNicj'></ul><sub id='HNicj'></sub></form><legend id='HNicj'></legend><bdo id='HNicj'><pre id='HNicj'><center id='HNicj'></center></pre></bdo></b><th id='HNicj'></th></span></q></dt></tr></i><div id='HNicj'><tfoot id='HNicj'></tfoot><dl id='HNicj'><fieldset id='HNicj'></fieldset></dl></div>

          <legend id='HNicj'><style id='HNicj'><dir id='HNicj'><q id='HNicj'></q></dir></style></legend>

            <small id='HNicj'></small><noframes id='HNicj'>

              • <bdo id='HNicj'></bdo><ul id='HNicj'></ul>

                • <tfoot id='HNicj'></tfoot>
                  本文介绍了有没有一种简单的方法来处理 WPF4 中的 Flick 等触摸事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在构建一个 Windows 7 触摸应用程序,并希望能够将触摸手势作为简单事件处理,特别是轻弹.我可以看到窗口有响应,它会在我轻弹时弹出图标,但我似乎找不到一种简单的方法来处理它们.类似于 grid.OnLeftFlick ...

                  I'm building a windows 7 touch app and want to be able to handle touch gestures as simple events, specifically flicks. I can see windows responding, it pops up the icons as I flick but I can't seem to find an easy way to handle them. Something like grid.OnLeftFlick ...

                  我错过了一些愚蠢的简单事情吗?有工具包或我可以使用的东西吗?或者,我必须编写自己的监听器吗?

                  Am I missing something stupidly simple? Is there a toolkit or something I can use? Or, do I have to write my own listener?

                  谢谢.

                  推荐答案

                  虽然 WPF4 确实支持多点触控,但它没有任何内置的手势支持,至少不是您所想的那种.轻弹、捏合缩放等功能都必须在 WPF4 之上进行编程.

                  While WPF4 does support multi-touch, it does not have any built in gesture support, at least not of the kind you are thinking about. Features such as flick, pinch-zoom, etc. all have to be programmed on top of WPF4.

                  我不知道任何更高级别的手势支持工具包,但编写自己的工具包并不像听起来那么难.此 WPF4 触摸示例展示了基于触摸的移动、捏合缩放和捏合旋转:

                  I don't know of any higher-level gesture support toolkits but writing your own is not as hard as it sounds. This WPF4 touch sample shows for example touch based move, pinch-zoom and pinch-rotate:

                  • 演练:创建您的第一个触控应用程序

                  如果您编译并运行该示例,您会发现处理程序只有 10 到 20 行代码,并利用了触摸 API 本身的强大基础设施和核心 WPF 功能,例如转换矩阵.触摸 API 支持惯性等,因此请尝试满足您需求的轻弹.

                  If you compile and run the sample you'll see the handlers are only ten to twenty lines of code and make use of powerful infrastructure in the touch API itself and core WPF features such as transformation matrices. The touch API supports inertia, etc. so try your hand at a flick that meets your needs.

                  当然,此示例仅适用于笔和触控输入设备,而不是普通鼠标,但您指定您正在开发触控应用程序.

                  Also, of course, this sample only works with Pen and Touch input devices, not an ordinary mouse, but you specified that your are developing a touch application.

                  这篇关于有没有一种简单的方法来处理 WPF4 中的 Flick 等触摸事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Windows 7 任务栏图标突出显示颜色 下一篇:有没有办法在 Windows7 &amp; 中编写 WinRT 应用程序?VS2010?

                  相关文章

                  <tfoot id='ZFT7q'></tfoot>

                • <small id='ZFT7q'></small><noframes id='ZFT7q'>

                  • <bdo id='ZFT7q'></bdo><ul id='ZFT7q'></ul>
                  <i id='ZFT7q'><tr id='ZFT7q'><dt id='ZFT7q'><q id='ZFT7q'><span id='ZFT7q'><b id='ZFT7q'><form id='ZFT7q'><ins id='ZFT7q'></ins><ul id='ZFT7q'></ul><sub id='ZFT7q'></sub></form><legend id='ZFT7q'></legend><bdo id='ZFT7q'><pre id='ZFT7q'><center id='ZFT7q'></center></pre></bdo></b><th id='ZFT7q'></th></span></q></dt></tr></i><div id='ZFT7q'><tfoot id='ZFT7q'></tfoot><dl id='ZFT7q'><fieldset id='ZFT7q'></fieldset></dl></div>

                    <legend id='ZFT7q'><style id='ZFT7q'><dir id='ZFT7q'><q id='ZFT7q'></q></dir></style></legend>