使用鼠标时更换握持处理程序 [英] Replacing Holding Handler when using mouse

查看:62
本文介绍了使用鼠标时更换握持处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,其中Hold事件非常重要(它会显示一个小菜单,用户可以选择操作的地方)。  但是,当使用鼠标时,我不完全确定提供这个小菜单的最佳选择。点击的
事件已经在使用中,它将在表面上找到并选择对象。

I am developing an app where the Holding event is rather important (it brings up a small menu, where the user can select actions).  However, when a mouse is being used, I'm not entirely sure what the best option is to bring up this small menu. The tapped event is already in use, where it will find and select objects on the surface.

我能想到的两个选项是:

The two options I can think of off the top of my head are:



    • 使用点击事件,检测是否正在使用鼠标,如果没有检测到任何对象,则调出菜单。
    • 使用正确的点击事件。然而,这通常会带来应用程序栏,所以它有点尴尬。特别是因为大部分的"白色空间"。我的应用程序将调出此菜单。这意味着我必须调出应用栏和菜单。

另外,我不想把这些应用程序栏中的选项。



我希望尽可能地遵循Metro风格应用程序的指导原则,因此任何有关这些方面的建议都将受到赞赏。

Also, I do not want to put these options in the app bar.

I'd prefer to follow the guidelines for Metro style apps as closely as possible, so any advice along those ways would be appreciated.

谢谢!

Tomas

推荐答案

怎么样?使用举办活动?您可以在GestureSettings中使用HoldWithMouse设置。这里有一个很好的文档:

http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.input.gesturerecognizer.holding

希望它有所帮助。


这篇关于使用鼠标时更换握持处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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