ID

Uploaded

Status

Description

Work Items

Action

6945
by isaks
Sep 29, 2010
2:25 PM

Applied

Updated version of patch id #6935

I noticed some problems when I started using the attached event in my application so I modified the sematics a bit
* To enable gesture support, you now call Blake.NUI.WPF.Gestures.Events.RegisterGestureEventSupport(this) with the root element from which to enable gestures (typically the main window). No need to set it on each control listening to the events
* Gestures now also work even if some control higher up in the hierarchy handles the individual touch events. I'm not 100% sure if this is desired, but it is how the Contact*Gesture events works in the original surface SDK so I went with that.
* The events now properly sets Source and OriginalSource in the event arguments just like normal input events. It even uses the input manager to do the hit testing. This means that if you do a gesture over a image, you can capture it in a parent grid for instance and still see which control that initially got it.

I've also put much more intellisense documentation in the relevant classes and interfaces.


Applied Oct 7, 2010: Patch applied.

11986
12047

Download

6935
by isaks
Sep 28, 2010
2:47 PM

Declined

Patch that adds attached routed events for the gestures.
This patch is a work in progress, and right now I'm looking for feedback on how to improve it to better fit the direction Blake.NUI is heading. It is, however, working and there's code in the TestApplication that shows its behavior and intended use.

A note about the patch: it modifies how the engines are used and introduces a couple of classes to take care of this. I've tried to document the important parts in the code but in a nutshell we have:
engines - still mostly the same as before. One engine takes care of a single gesture
EngineHandler - wrapper class that takes care of interfacing with the individual engines. It's needed in order to allow engines to be transparently used by both triggers and the attached events. I'm not super satisfied with the fact that I needed 2 different variants of it, but I couldn't come up with a cleaner solution.
IGestureEngine - interface that all engines implement. Allows the EngineHandler to treat engines in a generic way
Events - static class containing the attached events and properties that facilitates the use directly from XAML. To enable these events, an elements need to set the attached property Events.AreGesturesEnabled to true since this creates and enables the gesture engines.

This patch also contains my previous patch (id 6870) that added the HoldGesture so when/if this is eventually applied, there's no need to apply the other patch.


Declined Oct 7, 2010: Newer patch includes this patch

6870
by isaks
Sep 22, 2010
7:53 PM

Declined

Adds a new gesture trigger that handles a "hold" gesture (press and keep pressed for a certain duration, never releasing)


Declined Oct 7, 2010: Newer patch includes this patch

11986
View All
  • 1-3 of 3 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches