简体   繁体   English

创建自己的双击功能

[英]Creating My Own Double-Click Functionality

I'm unhappy with how my SUR40 is reading my double-clicks. 我对SUR40读取双击的方式感到不满意。 I wish to somehow create my own double-click functionality for both my programs and (if possible) the SUR40/Windows 7. Here's the current problems I would like to change. 祝您在我的程序以某种方式创建自己的双击功能,并且(如果可能)SUR40 / Windows 7的下面是目前存在的问题,我想改变。 Any help/advice/code you could offer would be greatly appreciated. 您可以提供的任何帮助/建议/代码将不胜感激。 Please be specific as I am new to using WPF/SDK2.0. 请具体说明,因为我是WPF / SDK2.0的新手。 I am currently coding in C# programming language using Visual Studio 2010 and Expression Blend 4. 我目前正在使用Visual Studio 2010和Expression Blend 4以C#编程语言进行编码。

1) I need pin-point accuracy for both touches which doesn't naturally happen. 1)我需要两种触摸都无法做到的精确度。 I wish to figure out how to adjust the "area" where I can tap twice and the table,Windows 7, and my program(s) accepts it as a double-click. 我想弄清楚如何调整“区域”在那里我可以点击两次,桌子,Windows 7和我的程序(一个或多个)接受它作为一个双击。 The current problem is if I touch a millimeter away from the first tap, it reads it as either a drag, or as a delayed double-click (like when you want to rename a file, you double-click a little slower than usual on it). 当前的问题是,如果我与第一次点击相距一毫米,它将读取为拖动或延迟的双击(例如,当您想重命名文件时,双击速度比平常慢一点)它)。

2) Is basically as problem 1 but with the "hold-down" (right-click) touch where you hold your finger down for a couple of seconds and you get the circle that envelopes around your finger creating the right-click menu. 2)基本上和问题1一样,但是用“按住”(右键单击)触摸时,您将手指按住几秒钟,然后您的手指周围出现一个圆圈,从而创建了右键单击菜单。 As with problem 1; 与问题1一样; if my finger slides more than a hair's-width, it treats it as a drag instead of a right-click. 如果我的手指滑动比hair's宽度更大,它把它作为一个阻力,而不是单击鼠标右键。 I wish to somehow adjust this so that if my finger sways a little bit, it will still treat the finger as a click. 我希望以某种方式调整这个,这样,如果我的手指摇晃一点点,它仍将把手指点击。 I am also having difficulty figuring out how to get this right-click functionality to work with my program. 我也很难弄清楚如何获得此右键单击功能以与我的程序一起使用。

3)In my program, I have menus with stackpanels and expanders. 3)在我的程序中,我有带有堆栈面板和扩展器的菜单。 Within these are different menus (treated as ISBNodes) which are meant to either be clicked to view their children or to drag out to open in a new window for them. 这些菜单中有不同的菜单(视为ISBNodes),这些菜单可以单击以查看其子级,也可以拖出以在其新窗口中打开。 Again, the area to accept a click is too small and a lot of times a meant-to-be click is read as a drag. 再一次,接受点击的区域太小,很多时候,有意点击被视为拖曳。 I wish to fix this as well and the only way I can think of is to somehow adjust the area for an accepted click so that your finger has a little "sway room". 我想解决这个问题,以及和我能想到的唯一的办法就是以某种方式调整该地区公认的点击,使您的手指有一点点“摇摆室”。

Surface is a specialized device meant to be used withy specialized applications. Surface是一种专用于特定应用程序的设备。 If you're trying to use it to control Windows, a web browser, or any other desktop application then you will find that the experience is pretty crappy. 如果您试图使用它来控制Windows,Web浏览器或任何其他桌面应用程序,那么您会发现体验非常糟糕。 Those things are simply not designed for touch. 这些东西根本不是为触摸而设计的。 Windows 8 will make this better but who knows when that will be ready and if/when Surface will be updated to be compatible with it. Windows 8将会使这更好,但谁知道时将做好准备,如果/当表面将被更新为与之兼容。

Right click and double click are strongly discouraged by the Surface design guidelines. Surface设计准则强烈建议不要右键单击和双击。 Go read over those carefully and shift your mindset to building a great touch application vs extending old school mouse concepts. 请仔细阅读这些内容,并转变思维方式,以构建出色的触摸应用程序,而不是扩展传统的鼠标概念。 If your expanders are too small to touch accurately then yeah... make 'em bigger. 如果扩展器太小而无法准确触摸,是的...使它们变大。 The Surface design guidelines will also tell you the minimum recommended size for hit targets. Surface设计指南还将告诉您命中目标的最小建议尺寸。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM