IStylusAsyncPlugin.CustomStylusDataAdded メソッド
CustomStylusData が使用可能であることを実装元のプラグインに通知します。
名前空間 : Microsoft.StylusInput
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Sub CustomStylusDataAdded ( _
sender As RealTimeStylus, _
data As CustomStylusData _
)
'使用
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
)
パラメータ
- 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 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
プラットフォーム
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0