Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Aggiornamento: novembre 2007
Crea un insieme Strokes basato su proprietà Id specificate degli oggetti Stroke.
Spazio dei nomi: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Sintassi
'Dichiarazione
Public Function CreateStrokes ( _
ids As Integer() _
) As Strokes
'Utilizzo
Dim instance As Ink
Dim ids As Integer()
Dim returnValue As Strokes
returnValue = instance.CreateStrokes(ids)
public Strokes CreateStrokes(
int[] ids
)
public:
Strokes^ CreateStrokes(
array<int>^ ids
)
public Strokes CreateStrokes(
int[] ids
)
public function CreateStrokes(
ids : int[]
) : Strokes
Parametri
- ids
Tipo: array<System.Int32[]
Matrice di proprietà Id specificate per gli oggetti Stroke presenti nell'oggetto Ink. Gli oggetti Stroke con questi valori Id vengono aggiunti a un insieme Strokes nuovo. Il valore predefinito è nullriferimento null (Nothing in Visual Basic) (Nothing in Microsoft Visual Basic.NET).
Valore restituito
Tipo: Microsoft.Ink.Strokes
Restituisce un insieme Strokes nuovo.
Note
Se il parametro ids è nullriferimento null (Nothing in Visual Basic) (Nothing in Visual Basic .NET) o una matrice vuota, viene creato un insieme Strokes vuoto.
Esempi
In questo esempio, un insieme Strokes nuovo viene creato da una matrice di proprietà Id. Le proprietà Id vengono ottenute esaminando ogni oggetto Stroke associato attualmente a un oggetto InkOverlay.
' Access to the Ink.Strokes property returns a copy of the Strokes object.
' This copy must be implicitly (via using statement) or explicitly
' disposed of in order to avoid a memory leak.
Using currentStrokes As Strokes = mInkOverlay.Ink.Strokes
' Declare an array of integers
Dim theStrokeIDs(currentStrokes.Count - 1) As Integer
' Copy stroke IDs into the array
For k As Integer = 0 To currentStrokes.Count - 1
theStrokeIDs(k) = currentStrokes(k).Id
Next
' Create a new collection using the array of stroke IDs
Dim newStokes As Strokes = mInkOverlay.Ink.CreateStrokes(theStrokeIDs)
End Using
// Access to the Ink.Strokes property returns a copy of the Strokes object.
// This copy must be implicitly (via using statement) or explicitly
// disposed of in order to avoid a memory leak.
using (Strokes currentStrokes = mInkOverlay.Ink.Strokes)
{
// Declare an array of integers
int[] theStrokeIDs = new int[currentStrokes.Count];
// Copy stroke IDs into the array
for (int k = 0; k < currentStrokes.Count; k++)
{
theStrokeIDs[k] = currentStrokes[k].Id;
}
// Create a new collection using the array of stroke IDs
Strokes newStrokes = mInkOverlay.Ink.CreateStrokes(theStrokeIDs);
}
Piattaforme
Windows Vista
.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.
Informazioni sulla versione
.NET Framework
Supportato in: 3.0