MultitouchCore - WPF Framework
Posted: 02 April 2008 01:03 AM   [ Ignore ]
Sr. Member
RankRankRank
Total Posts:  77
Joined  2007-06-06

I have “finished” my first version of a WPF multitouch ui layer, I have attached a binary release if people are interested in testing it out. Currently it uses OSC to receive data from touchlib, in the future could also use something like CSTI. It uses attached events to do all of its wiring up, no need for custom controls you can use any existing wpf control and it should support the full bubbling model. Available events, TouchDown, TouchUp, TouchMove, TouchDragEnter, TouchDragLeave, TouchDragOver, TouchDrop. It also supports “mouse emulation” where it will instead of reading from OSC translate mouse clicks into touch events....this obviously isnt multitouch but is useful for development when you can prototype some basic single touch interaction.

Usage

1. Add namespace:

using System.Windows.Input.Multitouch;

2. Initialize a TouchDispatcher( args: port, rootElement, highlightTouchPoints, emulateMouse, resolution ):

TouchDispatcher dispatcher = new TouchDispatcher3333mainGridtruetrue, new Size1024768 ) );

3. Start receiving events (this is non blocking, does all of its receiving in another thread):

dispatcher.StartReceive();

4. Wire up the event:

XAML

a. Add namespace to your usercontrol:

xmlns:mt="http://schemas.nuigroup.com/wpf/ui"

b. Add event to any control

<Button Name="btnPlay" mt:TouchDispatcher.TouchUp="Play" Content="Play" />

c. Add Eventhandler in codebehind:

protected void Playobject senderRoutedTouchEventArgs e )
{
}

Codebehind

a. Add namespace reference:

using System.Windows.Input.Multitouch;

b. Wire up event:

TouchDispatcher.AddTouchDownHandlerbtnPlay, new RoutedTouchEventHandlerPlay ) );

c. Add Eventhandler:

protected void Playobject senderRoutedTouchEventArgs e )
{
}

It also supports drag/drop using TouchDispatcher.DoDragDrop()

I have tested the pieces that I am using directly a little, but some of the things are untested. I would be interested in any feedback people have, and also if other people were interested in collaborating a bit more so we can make 1 great framework for WPF.

File Attachments
MultitouchCore_v0.1.zip  (File Size: 33KB - Downloads: 181)
Profile
 
 
Posted: 03 April 2008 02:59 AM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  3
Joined  2008-02-03

Great work, i’m definetly gonna try this out this weekend, just received some componenets (leds) i was waiting for.. smile I was waiting for my table to get stable until i wanted to work on something similair.. this will save me alot of time, thanks..

Any change for releasing the sources aswell?

Profile
 
 
Posted: 03 April 2008 12:35 PM   [ Ignore ]   [ # 2 ]
Sr. Member
RankRankRank
Total Posts:  77
Joined  2007-06-06
Helza - 03 April 2008 02:59 AM

Great work, i’m definetly gonna try this out this weekend, just received some componenets (leds) i was waiting for.. smile I was waiting for my table to get stable until i wanted to work on something similair.. this will save me alot of time, thanks..

Any change for releasing the sources aswell?

probably at some point yea, i am talking to a few people who are doing similar things to see if we can get together and release 1 thing instead of releasing a bunch of diff versions.

Profile
 
 
Posted: 19 May 2008 02:19 PM   [ Ignore ]   [ # 3 ]
Elite
RankRankRankRank
Total Posts:  112
Joined  2008-02-04

Haven’t been able to try out the code yet :( gotten a little side-tracked .. hopefully next couple weeks i can pick it up my developement efforts again as soon as i got my table functioning smile

Profile