Strokes.Add - метод (Strokes)
Обновлен: Ноябрь 2007
Adds a Strokes collection to the Strokes collection.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public Sub Add ( _
strokes As Strokes _
)
'Применение
Dim instance As Strokes
Dim strokes As Strokes
instance.Add(strokes)
public void Add(
Strokes strokes
)
public:
void Add(
Strokes^ strokes
)
public void Add(
Strokes strokes
)
public function Add(
strokes : Strokes
)
Параметры
- strokes
Тип: Microsoft.Ink.Strokes
The Strokes collection to add to the Strokes collection.
Заметки
The Stroke object must already exist within the Ink object and cannot belong to another Ink object. In addition, this method does not copy or otherwise alter the Ink object, but merely adds this Stroke to the Strokes collection.
Примеры
In this example, a Stroke object is added to a newly created Strokes collection. This collection in turn is added to another Strokes collection. The Ink object passed to the example method is used to create new Strokes collections, and new Stroke objects. When you create a new Stroke object by calling the CreateStroke method, the newly created Stroke is automatically added to the main Strokes() collection of the Ink object. In addtion, as shown in this example, the newly created Stroke object can be added to other Strokes collections.
Private Sub AddStrokes(ByVal mInk As Ink)
' create a new Strokes collection
Dim newStrokes1 As Strokes = mInk.CreateStrokes()
' create a new Stroke
Dim points As Point() = {New Point(500, 500), New Point(500, 2500)}
Dim newStroke As Stroke = mInk.CreateStroke(points)
' add the new Stroke to the Strokes collection
newStrokes1.Add(newStroke)
' create another Strokes collection
Dim newStrokes2 As Strokes = mInk.CreateStrokes()
' add the first Strokes collection to the second Strokes collection
newStrokes2.Add(newStrokes1)
End Sub
private void AddStrokes(Ink mInk)
{
// create a new Strokes collection
Strokes newStrokes1 = mInk.CreateStrokes();
// create a new Stroke
Point[] points = { new Point(500, 500), new Point(500, 2500) };
Stroke newStroke = mInk.CreateStroke(points);
// add the new Stroke to the Strokes collection
newStrokes1.Add(newStroke);
// create another Strokes collection
Strokes newStrokes2 = mInk.CreateStrokes();
// add the first Strokes collection to the second Strokes collection
newStrokes2.Add(newStrokes1);
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0