Bagikan melalui


CustomStrokes.Add Method

CustomStrokes.Add Method

Adds a Strokes collection to the CustomStrokes collection.

Definition

Visual Basic .NET Public Sub Add( _
ByVal name As String, _
ByVal strokes As Strokes _
)
C# public void Add(
string name,
Strokes strokes
);
Managed C++ public: void Add(
String *name,
Strokes *strokes
);

Parameters

name System.String. The name of the Strokes collection to add to the CustomStrokes collection.
strokes Microsoft.Ink.Strokes. The Strokes collection to add to the CustomStrokes collection.

Remarks

Note: If you call this method with the name parameter set to a name that already exists in the CustomStrokes collection, an exception is thrown.

Examples

[C#]

This C# example takes the current Strokes collection, theCurrentStrokes, in the Ink object associated with an InkCollector object, theInkCollector, and adds theCurrentStrokes to that Ink object's CustomStrokes collection.

theInkCollector.Ink.CustomStrokes.Add("theCurrentStrokes",
    theInkCollector.Ink.Strokes);
                

[VB.NET]

This Microsoft® Visual Basic® .NET example takes the current Strokes collection, theCurrentStrokes, in the Ink object associated with an InkCollector object, theInkCollector, and adds theCurrentStrokes to that Ink object's CustomStrokes collection.

theInkCollector.Ink.CustomStrokes.Add("theCurrentStrokes", _
    theInkCollector.Ink.Strokes)
                

See Also