IStylusSyncPlugin.CustomStylusDataAdded 方法
通知实现插件 CustomStylusData 可用。
命名空间: Microsoft.StylusInput
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Sub CustomStylusDataAdded ( _
sender As RealTimeStylus, _
data As CustomStylusData _
)
用法
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
)
参数
- sender
类型:Microsoft.StylusInput.RealTimeStylus
发送自定义数据的 RealTimeStylus 对象。
- data
类型:Microsoft.StylusInput.PluginData.CustomStylusData
由 RealTimeStylus 对象发送的 CustomStylusData 对象。
示例
此 C# 示例摘自 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;
}
}
}
}
此 Microsoft Visual Basic .NET 示例摘自 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
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0