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