IStylusAsyncPlugin.CustomStylusDataAdded, méthode
Mise à jour : November 2007
Avertit le plug-in d'implémentation que CustomStylusData est disponible.
Espace de noms : Microsoft.StylusInput
Assembly : Microsoft.Ink (dans Microsoft.Ink.dll)
Syntaxe
'Déclaration
Sub CustomStylusDataAdded ( _
sender As RealTimeStylus, _
data As CustomStylusData _
)
'Utilisation
Dim instance As IStylusAsyncPlugin
Dim sender As RealTimeStylus
Dim data As CustomStylusData
instance.CustomStylusDataAdded(sender, _
data)
void CustomStylusDataAdded(
RealTimeStylus sender,
CustomStylusData data
)
void CustomStylusDataAdded(
RealTimeStylus^ sender,
CustomStylusData^ data
)
void CustomStylusDataAdded(
RealTimeStylus sender,
CustomStylusData data
)
function CustomStylusDataAdded(
sender : RealTimeStylus,
data : CustomStylusData
)
Paramètres
- sender
Type : Microsoft.StylusInput.RealTimeStylus
Objet RealTimeStylus qui a envoyé les données personnalisées.
- data
Type : Microsoft.StylusInput.PluginData.CustomStylusData
Objet CustomStylusData envoyé par l'objet RealTimeStylus.
Exemples
Cet exemple C# est extrait du RealTimeStylus Plug-in Sample.
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)
{
GestureRecognitionData grd = data.Data as GestureRecognitionData;
if (grd != null)
{
if (grd.Count > 0)
{
GestureAlternate ga = grd[0];
sbGesture.Text = "Gesture=" + ga.Id + ", Confidence=" + ga.Confidence;
}
}
}
}
Cet exemple Microsoft Visual Basic .NET est extrait du RealTimeStylus Plug-in Sample.
Public Sub CustomStylusDataAdded(sender As RealTimeStylus, data As CustomStylusData)
Implements IStylusAsyncPlugin.CustomStylusDataAdded
' 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 Then
Dim grd As GestureRecognitionData = CType(data.Data, GestureRecognitionData)
If Not (grd Is Nothing) Then
If grd.Count > 0 Then
Dim ga As GestureAlternate = grd(0)
sbGesture.Text = "Gesture=" + ga.Id + ", Confidence=" + ga.Confidence
End If
End If
End If
End Sub 'CustomStylusDataAdded
Plateformes
Windows Vista, Windows XP SP2, Windows Server 2003
Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
Informations de version
.NET Framework
Pris en charge dans : 3.0