简体   繁体   中英

Creating My Own Double-Click Functionality

I'm unhappy with how my SUR40 is reading my double-clicks. 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. Any help/advice/code you could offer would be greatly appreciated. Please be specific as I am new to using WPF/SDK2.0. I am currently coding in C# programming language using Visual Studio 2010 and Expression Blend 4.

1) I need pin-point accuracy for both touches which doesn't naturally happen. 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. 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. As with problem 1; if my finger slides more than a hair's-width, it treats it as a drag instead of a right-click. 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. 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. 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. 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. 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.

Right click and double click are strongly discouraged by the Surface design guidelines. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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