About this Blog

fGroove is a audio loop player that allows multiple people to select audio loops that will play in time and at the correct tempo. Think of it as a multitouch version of a groove matrix. Note, I'm just learning to program the surface. While code examples here should work, they may not be the "correct" or "official" way of doing things

Friday, December 18, 2009

Library Stack vs PreviewContactTapGesture

So now I've got scatterviewitems being added to the library stack the next task is to get a tap gesture on the librarystack to trigger all the loops held in the stack. This should just be as easy as:

lbs[0].PreviewContactTapGesture += new ContactEventHandler(SurfaceWindow1_PreviewContactTapGesture);

However that doesn't seem to work in my application. I suspect that it's because of the way I've added the LibraryStack. Here's the Xaml for the surface window.







Grid.Column="0"
x:Name="MainScatterView"

ItemTemplate="{StaticResource ScatterViewItemDataTemplate}"
ItemsSource="{Binding SourceItems}"

s:Contacts.PreviewContactTapGesture="onPreviewContactTapGesture"
s:Contacts.PreviewContactHoldGesture="MainScatterView_PreviewContactHoldGesture"
s:SurfaceDragDrop.DragCanceled="OnDragCanceled"
s:SurfaceDragDrop.DragCompleted="OnDragCompleted"
s:Contacts.ContactChanged="MainScatterView_ContactChanged"
/>
x:Name="LibraryScatterView"
Grid.Column="0"
>





The LibrarySyack is just added to the LibraryScatterView item, which I suspect is capturing the tap gestures. Lets see what a few experiments turn up.

No comments:

Post a Comment