GestureAlternate.StrokeCount - свойство
Обновлен: Ноябрь 2007
Gets the number of strokes assumed to make up the application gesture that was recognized.
Пространство имен: Microsoft.StylusInput.PluginData
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public ReadOnly Property StrokeCount As Integer
'Применение
Dim instance As GestureAlternate
Dim value As Integer
value = instance.StrokeCount
public int StrokeCount { get; }
public:
property int StrokeCount {
int get ();
}
/** @property */
public int get_StrokeCount()
public function get StrokeCount () : int
Значение свойства
Тип: System.Int32
The number of strokes assumed to make up the application gesture that was recognized.
Примеры
This Microsoft Visual C# .NET example is a snippet from the implementation of the IStylusAsyncPlugin interface's CustomStylusDataAdded method. The form that implements the IStylusAsyncPlugin interface contains a TextBox object, theTextBox. The CustomStylusDataAdded method checks for custom stylus data from the GestureRecognizer object and displays information about any gesture or gestures that the GestureRecognizer object recognized.
using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;
// ...
// Declare the RealTimeStylus objects, the GestureRecognizer plugin,
// and the DynamicRenderer plug-in.
private Microsoft.StylusInput.RealTimeStylus thePrimaryRealTimeStylus = null;
private Microsoft.StylusInput.RealTimeStylus theSecondaryRealTimeStylus = null;
private Microsoft.StylusInput.GestureRecognizer theGestureRecognizer = null;
private Microsoft.StylusInput.DynamicRenderer theDynamicRenderer = null;
// ...
// Informs the implementing object that user data is available.
public void CustomStylusDataAdded(RealTimeStylus sender, CustomStylusData data)
{
// We can identify the kind of custom data via either the Guid or Type.
// For the purpose of this demonstration we will validate both just to be safe.
// For other scenarios either approach is valid.
if (data.CustomDataId == GestureRecognizer.GestureRecognitionDataGuid)
{
// Cast the custom stylus data to gesture recognition data.
GestureRecognitionData theData = data.Data as GestureRecognitionData;
// If there is data in the notification, then display the information
// for all of the gestures recognized.
if (theData != null && theData.Count > 0)
{
this.theTextBox.Text = "GestureRecognitionData:" + Environment.NewLine;
foreach (GestureAlternate theGesture in theData)
{
this.theTextBox.Text += string.Format(
" Gesture {0,-10}, Confidence {1,-8}, Count {2}."
+ Environment.NewLine, theGesture.Id,
theGesture.Confidence, theGesture.StrokeCount);
}
this.theTextBox.Text += Environment.NewLine;
}
}
}
Платформы
Windows Vista, Windows XP с пакетом обновления 2 (SP2), Windows Server 2003
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0