The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
InkCanvas.Gesture Event
Visual Studio 2008
Occurs when the InkCanvas detects a gesture.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The following example demonstrates how to set up an InkCanvas to recognize application gestures.
// Add this code to the contstructor or OnLoaded method. if (inkCanvas1.IsGestureRecognizerAvailable) { inkCanvas1.EditingMode = InkCanvasEditingMode.InkAndGesture; inkCanvas1.Gesture += new InkCanvasGestureEventHandler(inkCanvas1_Gesture); inkCanvas1.SetEnabledGestures(new ApplicationGesture[] {ApplicationGesture.Down, ApplicationGesture.ArrowDown, ApplicationGesture.Circle}); } ... void inkCanvas1_Gesture(object sender, InkCanvasGestureEventArgs e) { ReadOnlyCollection<GestureRecognitionResult> gestureResults = e.GetGestureRecognitionResults(); // Check the first recognition result for a gesture. if (gestureResults[0].RecognitionConfidence == RecognitionConfidence.Strong) { switch (gestureResults[0].ApplicationGesture) { case ApplicationGesture.Down: // Do something. break; case ApplicationGesture.ArrowDown: // Do something. break; case ApplicationGesture.Circle: // Do something. break; } } }
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Community Additions
Show: