Compartir a través de


Strokes.Add Method

Strokes.Add Method

Adds a Stroke object to the Strokes collection.

Definition

Visual Basic .NET Public Function Add( _
ByVal stroke As Stroke _
) As Integer
C# public int Add(
Stroke stroke
);
Managed C++ public: int* Add(
Stroke *stroke
);

Parameters

stroke Microsoft.Ink.Stroke. The Stroke to add to the Strokes collection.

Return Value

System.Int32. This method always returns a value of -1.

Exceptions

ArgumentException Leave Site: One of the parameters is not valid.
ArgumentException Leave Site: One of the parameters is not valid.
COMException Leave Site:
ObjectDisposedException Leave Site: The Stroke object is disposed.

Remarks

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.

Examples

[C#]

This C# example adds the Stroke object, theNewStroke to the Strokes collection in the Ink object, theInk.

theInk.Strokes.Add(theNewStroke);
                

[VB.NET]

This Microsoft® Visual Basic® .NET example adds the Stroke object, theNewStroke to the Strokes collection in the Ink object, theInk.

theInk.Strokes.Add(theNewStroke)
                

See Also