StrokesEventArgs.StrokeIds, propriété
Mise à jour : November 2007
Obtient un tableau d'identificateurs, de type Int32 (page pouvant être en anglais), pour chaque objet Stroke affecté par l'événement.
Espace de noms : Microsoft.Ink
Assembly : Microsoft.Ink (dans Microsoft.Ink.dll)
Syntaxe
'Déclaration
Public ReadOnly Property StrokeIds As Integer()
'Utilisation
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[]
Valeur de propriété
Type : array<System.Int32[]
Tableau d'identificateurs pour chaque objet Stroke affecté par l'événement.
Exemples
Dans cet exemple, un gestionnaire d'événements InkAdded écrit des informations à propos des traits ajoutés à un contrôle Listbox.
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());
}
}
}
Dans cet exemple, un gestionnaire d'événements InkDeleted écrit des informations à propos des traits supprimés dans un contrôle ListBox.
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());
}
}
}
Plateformes
Windows Vista
Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
Informations de version
.NET Framework
Pris en charge dans : 3.0