InkPicture.GetGestureStatus Method
Returns a value that indicates whether the InkPicture control has interest in a particular application gesture.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)
Syntax
'Declaration
Public Function GetGestureStatus ( _
gesture As ApplicationGesture _
) As Boolean
'Usage
Dim instance As InkPicture
Dim gesture As ApplicationGesture
Dim returnValue As Boolean
returnValue = instance.GetGestureStatus(gesture)
public bool GetGestureStatus (
ApplicationGesture gesture
)
public:
bool GetGestureStatus (
ApplicationGesture gesture
)
public boolean GetGestureStatus (
ApplicationGesture gesture
)
public function GetGestureStatus (
gesture : ApplicationGesture
) : boolean
Not applicable.
Parameters
- gesture
A member of the ApplicationGesture enumeration that represents the gesture to query about.
Return Value
Whether the InkPicture control has interest in a particular application gesture.
Value |
Meaning |
---|---|
true |
The InkPicture control has interest in the gesture. The Gesture event is raised when the gesture is recognized. |
false |
The InkPicture control has no interest in the gesture. |
Remarks
This method throws an exception if the gesture parameter is set to AllGestures
To set interest of the InkPicture control for a particular gesture, call the InkPicture.SetGestureStatus method
Note
By default, the InkPicture control does not have interest in any application gesture
Example
This C# example creates an ArrayListthat contains all application gestures for which an InkPicture control, theInkPicture
, has interest.
[C#]
using Microsoft.Ink;
// . . .
// Return an array of all of the ApplicationGestures that
// have their status set to true on the InkPicture control.
private ApplicationGesture [] GetSetAppGestures(InkPicture theInkPicture)
{
ArrayList result = new ArrayList();
Array gestureArray = System.Enum.GetValues(typeof(ApplicationGesture));
foreach (ApplicationGesture theGesture in gestureArray)
{
// ApplicationGesture.AllGestures is not a meaningful
// gesture to pass to GetGestureStatus()
if (theGesture != ApplicationGesture.AllGestures &&
theInkPicture.GetGestureStatus(theGesture))
{
result.Add(theGesture);
}
}
return (ApplicationGesture[])result.ToArray(typeof(ApplicationGesture));
//...
This Microsoft® Visual Basic® .NET example creates an ArrayListthat contains all application gestures for which an InkPicture control, theInkPicture
, has interest.
[Visual Basic]
Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkPicture object.
Private Function GetSetAppGestures(ByVal theInkPicture As InkPicture) As ApplicationGesture()
Dim result As New ArrayList()
Dim sampleGesture As ApplicationGesture = ApplicationGesture.NoGesture
Dim theGestures As Array = System.Enum.GetValues(sampleGesture.GetType())
Dim theGesture As ApplicationGesture
For Each theGesture In theGestures
' ApplicationGesture.AllGestures is not a meaningful
' gesture to pass to GetGestureStatus()
If (Not theGesture.Equals(ApplicationGesture.AllGestures)) AndAlso _
theInkPicture.GetGestureStatus(theGesture) Then
result.Add(theGesture)
End If
Next
Return CType(result.ToArray(sampleGesture.GetType()), ApplicationGesture())
End Function
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
InkPicture Class
InkPicture Members
Microsoft.Ink Namespace
ApplicationGesture
InkPicture.Gesture
InkPicture.SetWindowInputRectangle