GestureAlternate.Id-Eigenschaft
Ruft den eindeutigen Bezeichner der Anwendungsstiftbewegung ab, die aufgetreten ist.
Namespace: Microsoft.StylusInput.PluginData
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public ReadOnly Property Id As ApplicationGesture
'Usage
Dim instance As GestureAlternate
Dim value As ApplicationGesture
value = instance.Id
public ApplicationGesture Id { get; }
public:
property ApplicationGesture Id {
ApplicationGesture get ();
}
/** @property */
public ApplicationGesture get_Id()
public function get Id () : ApplicationGesture
Eigenschaftenwert
Typ: Microsoft.Ink.ApplicationGesture
Ein Member der ApplicationGesture-Enumeration, der die aufgetretene Anwendungsstiftbewegung angibt.
Beispiele
Dieses Microsoft Visual C# .NET-Beispiel ist ein Ausschnitt aus der Implementierung der CustomStylusDataAdded-Methode der IStylusAsyncPlugin-Schnittstelle. Das Formular, das die IStylusAsyncPlugin-Schnittstelle implementiert, enthält das TextBox-Objekt theTextBox. Die CustomStylusDataAdded-Methode führt eine Überprüfung auf benutzerdefinierte Tablettstiftdaten aus dem GestureRecognizer-Objekt durch und zeigt Informationen zu Stiftbewegungen an, die vom GestureRecognizer-Objekt erkannt wurden.
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;
}
}
}
Plattformen
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.
Versionsinformationen
.NET Framework
Unterstützt in: 3.0