Bagikan melalui


CustomStrokes.Remove Method

CustomStrokes.Remove Method

Removes a Strokes collection from a CustomStrokes collection.

Definition

Visual Basic .NET Public Sub Remove( _
ByVal s As String _
)
C# public void Remove(
string s
);
Managed C++ public: void Remove(
String *s
);

Parameters

s System.String. The name that was used to add the Strokes collection to the CustomStrokes collection.

Remarks

The same Strokes collection that was added with the s parameter is removed when this method is called.

CustomStrokes collections are sets of references to ink data and are not the actual data itself. This method removes only the Strokes collection from a snapshot of, or reference to, the data and does not remove the Strokes collection from the actual ink data. To delete the collection from the actual ink data, call the Ink.DeleteStrokes method.

Examples

[C#]

This C# example adds and then removes a Strokes collection, OriginalStrokes, to and from a CustomStrokes collection, theCustomStrokes. The CustomStrokes collection is associated with an InkCollector object, theInkCollector.

CustomStrokes theCustomStrokes = theInkCollector.Ink.CustomStrokes;
theCustomStrokes.Add("OriginalStrokes", theInkCollector.Ink.Strokes);
// ...Do other operations in between...
theCustomStrokes.Remove("OriginalStrokes");
                

[VB.NET]

This Microsoft® Visual Basic® .NET example adds and then removes a Strokes collection, OriginalStrokes, to and from a CustomStrokes collection, theCustomStrokes. The CustomStrokes collection is associated with an InkCollector object, theInkCollector.

Dim theCustomStrokes As CustomStrokes = theInkCollector.Ink.CustomStrokes
theCustomStrokes.Add("OriginalStrokes", theInkCollector.Ink.Strokes)
' ...Do other operations in between...
theCustomStrokes.Remove("OriginalStrokes")
                

See Also