OUR NETWORK:MediaSmart Home Sansa Community Explore3DTV TechLore RoboCommunity Dijit Community About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 308229.0
March 9, 2009 01:44 PM
Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

JaYmZ666

Member
Joined: 01/15/2009

Hi everyone,

I have been trying to develop some apps with Win7 installed on my SmartTouch. based on the next link, there is a way to use WPF with multi-touch based on Stylus events: http://blog.andreweichacker.com/2009/02/windows-7-multi-touch-using-wpf/
Based also on this other thread, it seems that using WPF with NextWindow SDK is bringing some glitches (that I've experienced in recieved events in managed code): http://groups.google.com/group/wpf-disciples/browse_thread/thread/8f6c203a25d...
I've have also tried to gather WM_ messages using WndProc call over the main WPF window, but events are only catchd when occuring on the window border... Is there a way to solve this?

Does anyone has some exprience on using this Multitouch device on WPF with a smooth user experience?

Thanks for your help, Ben.

Discussion:    Add a Comment | Comments 1-7 of 7 | Latest Comment

March 9, 2009 8:10 PM

Hi Ben,

As you noted, the WM_Touch messages aren't available with WPF. The reason for this is that WPF actually blocks these messages. My only guess is that, as they are working on supporting the feature more fully for WPF 4.0, they're attempting to maintain control over how multi-touch is handled. WPF uses only one window, so the touch points can't be distinguished among the various visual elements - only the top window. Because of this, I can only speculate that they are capturing these messages and providing some special cases to them to emulate this functionality.

As for the stability and reliability of the NextWindow driver, you'll have to accept that the driver is in beta and will have some issues. Hopefully, they'll have all of that ironed out before Windows 7 hits. In my experience, it has been stable enough for development purposes. How are things going for you?

--Andrew

March 10, 2009 3:41 AM

Hello Andrew,

I have been using the workaround provided by the first blog post I added on this thread, which is letting me getting both touch points on the TouchSmart (it's working quite well :) ). Unfortunately, I didn't got the NextWindow example to work, but anyway my goal is more to use WPF instead of Winforms anyway.

My problem today is more to try to reproduce things that are already in the ScatterView control you can find on the Surface SDK (move, rorate and resizing of a container control). Do anyone has found some code to do that (my maths are really bad).

Cheers, Ben.

March 10, 2009 11:54 AM

Hey Ben,

Glad to hear its been helpful :D

Unfortunately, I'm not sure I can help you with re-implementing the touch gestures. I'll give you some advice, though, that I often find helpful with any programming problem.

Try to solve the problem on paper, first. In this case, think about how you determine which gesture is being performed - what the differences are between the gestures you wish to support geometrically. Then go through that process, step by step, and write down the steps (psuedo code is always helpful when trying to figure something out). With this, you'll be able to derive what variables you need, as well as the math required to determine what's going on.

As far as math skills go, it is fairly simple geometry when you get down to it, so look into that if you need some guidance. Again, take the approach of how your mind recognizes the gesture, then work on the programming to emulate that. You can learn a lot from how your mind works, if you analyze the steps it takes to reach a conclusion.

Good luck!

--Andrew

March 10, 2009 1:14 PM

Thanks Andrew, I managed already to manipulate a couple a lines between my two finger points, next step is to do resizing/rotating of a rectangle or an image, Thanks :)

March 10, 2009 1:16 PM

No problem. Have fun :D

--Andrew

April 2, 2010 7:51 PM

Hey Ben,

In case you are planning on switching over to .NET 4.0 after its release, you can check out my new post regarding the new touch events. I'll get one together soon that outlines the use of gestures as well.

--Andrew

April 29, 2010 10:21 AM updated: April 29, 2010 10:22 AM

And here's the post on manipulation events.

--Andrew

Discussion:    Add a Comment | Back to Top | Comments 1-7 of 7 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window