InkOverlay.GetGestureStatus 方法
返回一个值,该值指示 InkOverlay 对象是否关注特定的应用程序笔势。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public Function GetGestureStatus ( _
gesture As ApplicationGesture _
) As Boolean
用法
Dim instance As InkOverlay
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
参数
- gesture
类型:Microsoft.Ink.ApplicationGesture
ApplicationGesture 枚举的成员,表示要查询的笔势。
返回值
类型:System.Boolean
一个指示 InkOverlay 对象是否关注特定应用程序笔势的值。
值 |
含义 |
---|---|
true |
InkOverlay 对象关注该笔势。识别笔势时将引发 Gesture 事件。 |
false |
InkOverlay 对象不关注该笔势。 |
备注
如果 gesture 参数设置为 AllGestures,则此方法将引发异常。
若要设置 InkOverlay 对象对特定笔势的关注,请调用 SetGestureStatus 方法。
备注
默认情况下,InkOverlay 对象不关注任何应用程序笔势。
示例
此 C# 示例创建一个 ArrayList,其中包含 InkOverlay 对象 theInkOverlay 关注的所有应用程序笔势。
using Microsoft.Ink;
// . . .
// Return an array of all of the ApplicationGestures that
// have their status set to true on the InkOverlay object.
private ApplicationGesture [] GetSetAppGestures(InkOverlay theInkOverlay)
{
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 &&
theInkOverlay.GetGestureStatus(theGesture))
{
result.Add(theGesture);
}
}
return (ApplicationGesture[])result.ToArray(typeof(ApplicationGesture));
}
此 Microsoft Visual Basic .NET 示例创建一个 ArrayList,其中包含 InkOverlay 对象 theInkOverlay 关注的所有应用程序笔势。
Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkOverlay object.
Private Function GetSetAppGestures(ByVal theInkOverlay As InkOverlay) 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 _
theInkOverlay.GetGestureStatus(theGesture) Then
result.Add(theGesture)
End If
Next
Return CType(result.ToArray(test.GetType()), ApplicationGesture())
End Function
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0