IStylusSyncPlugin.CustomStylusDataAdded (Método)
Actualización: noviembre 2007
Notifica al complemento que se implementa que CustomStylusData está disponible.
Espacio de nombres: Microsoft.StylusInput
Ensamblado: Microsoft.Ink (en Microsoft.Ink.dll)
Sintaxis
'Declaración
Sub CustomStylusDataAdded ( _
sender As RealTimeStylus, _
data As CustomStylusData _
)
'Uso
Dim instance As IStylusSyncPlugin
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
)
Parámetros
- sender
Tipo: Microsoft.StylusInput.RealTimeStylus
Objeto RealTimeStylus que envió los datos personalizados.
- data
Tipo: Microsoft.StylusInput.PluginData.CustomStylusData
Objeto CustomStylusData enviado por el objeto RealTimeStylus.
Ejemplos
Este ejemplo de C# se extrajo de 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;
}
}
}
}
Este ejemplo de Microsoft Visual Basic .NET se ha extraído de RealTimeStylus Plug-in Sample.
Public Sub CustomStylusDataAdded(sender As RealTimeStylus, data As CustomStylusData) _
Implements IStylusSyncPlugin.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
Plataformas
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Información de versión
.NET Framework
Compatible con: 3.0