There are other types of gestures that the user can perform, such as drawing letters or other shapes. These gestures may be more complex than a twist or drag, so we cannot just rely on simple finger tracking, but rather we need shape recognition.
We can store, recognize, and visualize shape gestures using a GestureLibrary
instance:
We access a particular
GestureLibrary
by requesting one through theGestureLibraries
type:GestureLibrary library = GestureLibraries.FromPrivateFile(this, "gestures");
When we want to load the gestures, or refresh the library, we invoke the
Load()
method:library.Load();
Then, we can list all the gestures in the library using the
GestureEntries
property:string[] entries = library.GestureEntries.ToArray();
To read the data about a specific gesture, we use the
GetGestures()
method:Gesture gesture = library.GetGestures("my gesture")[0];
With the gesture, we can visualize the pattern as a
Bitmap
instance:var bitmap = gesture...