StrokesEventArgs.StrokeIds-Eigenschaft
Ruft ein Array von Bezeichnern des Typs Int32 für jedes vom Ereignis betroffene Stroke-Objekt ab.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public ReadOnly Property StrokeIds As Integer()
'Usage
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[]
Eigenschaftenwert
Typ: array<System.Int32[]
Das Array von Bezeichnern für jedes vom Ereignis betroffene Stroke-Objekt.
Beispiele
In diesem Beispiel werden in einem InkAdded-Ereignishandler Informationen über die hinzugefügten Striche in ein Listenfeld-Steuerelement geschrieben.
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());
}
}
}
In diesem Beispiel werden in einem InkDeleted-Ereignishandler Informationen über die gelöschten Striche in ein Listenfeld-Steuerelement geschrieben.
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());
}
}
}
Plattformen
Windows Vista
.NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.
Versionsinformationen
.NET Framework
Unterstützt in: 3.0