次の方法で共有


StrokesEventArgs.StrokeIds プロパティ

イベントの影響を受けるすべての Stroke オブジェクトの、Int32 型の識別子の配列を返します。

名前空間 :  Microsoft.Ink
アセンブリ :  Microsoft.Ink (Microsoft.Ink.dll 内)

構文

'宣言
Public ReadOnly Property StrokeIds As Integer()
'使用
Dim instance As StrokesEventArgs
Dim value As Integer()

value = instance.StrokeIds
public int[] StrokeIds { get; }
public:
property array<int>^ StrokeIds {
    array<int>^ get ();
}
/** @property */
public int[] get_StrokeIds()
public function get StrokeIds () : int[]

プロパティ値

型 : array<System.Int32[]
イベントの影響を受けるすべての Stroke オブジェクトの識別子の配列。

この例では、追加されたストロークに関する情報が InkAdded イベント ハンドラによってリスト ボックス コントロールに書き込まれます。

Private Sub Ink_InkAdded(ByVal sender As Object, ByVal e As StrokesEventArgs)
    ' since this event fires in all modes, we will check EditingMode
    ' and examine the StrokeIds only if we are currently in mode: InkOverlayEditingMode.Ink 
    If InkOverlayEditingMode.Ink = Me.mInkOverlay.EditingMode Then
        For Each id As Integer In e.StrokeIds
            Me.listBoxStrokeId.Items.Add("Added ID:" + id.ToString())
        Next
    End If
End Sub
private void Ink_InkAdded(object sender, StrokesEventArgs e)
{
    // since this event fires in all modes, we will check EditingMode
    // and examine the StrokeIds only if we are currently in mode: InkOverlayEditingMode.Ink 
    if (InkOverlayEditingMode.Ink == this.mInkOverlay.EditingMode)
    {
        foreach (int id in e.StrokeIds)
        {
            this.listBoxStrokeId.Items.Add("Added ID:" + id.ToString());

        }
    }
}

この例では、削除されたストロークに関する情報が InkDeleted イベント ハンドラによってリスト ボックス コントロールに書き込まれます。

Private Sub Ink_InkDeleted(ByVal sender As Object, ByVal e As StrokesEventArgs)
    ' since this event fires in select mode also, we will check EditingMode
    ' and examine the StrokeIds only if we are currently in mode: InkOverlayEditingMode.Delete 
    If InkOverlayEditingMode.Delete = Me.mInkOverlay.EditingMode Then
        For Each id As Integer In e.StrokeIds
            Me.listBoxStrokeId.Items.Add("Deleted ID:" + id.ToString())
        Next
    End If
End Sub
private void Ink_InkDeleted(object sender, StrokesEventArgs e)
{
    // since this event fires in select mode also, we will check EditingMode
    // and examine the StrokeIds only if we are currently in mode: InkOverlayEditingMode.Delete 
    if (InkOverlayEditingMode.Delete == this.mInkOverlay.EditingMode)
    {
        foreach (int id in e.StrokeIds)
        {
            this.listBoxStrokeId.Items.Add("Deleted ID:" + id.ToString());

        }
    }
}

プラットフォーム

Windows Vista

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

StrokesEventArgs クラス

StrokesEventArgs メンバ

Microsoft.Ink 名前空間

Stroke

InkAdded

InkDeleted

Strokes.StrokesAdded

Strokes.StrokesRemoved

Stroke.Id