Ink.CreateStrokes - метод (array<Int32[])
Обновлен: Ноябрь 2007
Creates a Strokes collection based on specified Id properties of Stroke objects.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public Function CreateStrokes ( _
ids As Integer() _
) As Strokes
'Применение
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
Параметры
- ids
Тип: array<System.Int32[]
An array of specified Id properties for Stroke objects that exist in the Ink object. The Stroke objects with these Id values are added to a new Strokes collection. The default value is nullссылка null (Nothing в Visual Basic) (Nothing in Microsoft Visual Basic.NET).
Возвращаемое значение
Тип: Microsoft.Ink.Strokes
Returns a new Strokes collection.
Заметки
If the ids parameter is nullссылка null (Nothing в Visual Basic) (Nothing in Visual Basic .NET) or an empty array, an empty Strokes collection is created.
Примеры
In this example, a new Strokes collection is created from an array of Id properties. The Id properties are obtained by examining each Stroke object currently associated with an InkOverlay object.
' 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);
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0