Strokes.Remove Method (Strokes)
Removes a Strokes collection from the Strokes collection.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Sub Remove ( _
strokes As Strokes _
)
'Usage
Dim instance As Strokes
Dim strokes As Strokes
instance.Remove(strokes)
public void Remove(
Strokes strokes
)
public:
void Remove(
Strokes^ strokes
)
public function Remove(
strokes : Strokes
)
Parameters
strokes
Type: Microsoft.Ink.StrokesThe Strokes collection to remove.
Remarks
Strokes collections are sets of references to ink data rather than actual data. The Remove method removes ink data references rather than actual ink data. To delete actual ink data, call the Ink.DeleteStrokes method.
After calling the Remove method, objects in the collection are reordered. For example, in Microsoft Visual Basic.NET, after calling Strokes.Remove(Strokes.Item(0)), what was Strokes.Item(1) becomes Strokes.Item(0); what was strokes.Item(2) becomes strokes.Item(1); and so forth.
Examples
This C# example removes a Strokes collection, strokesToRemove, from a larger Strokes collection, theLeftToRightStokes, if the first point in the Stroke is not to the left of the last point in the Stroke. The original data in the Ink object are unaffected.
//...
Strokes strokesToRemove = theLeftToRightStrokes.Ink.CreateStrokes();
foreach (Stroke testStroke in theLeftToRightStrokes)
{
Point ptStart = testStroke.GetPoint(0);
Point ptEnd = testStroke.GetPoint(testStroke.PacketCount - 1);
if (ptStart.X > ptEnd.X)
strokesToRemove.Add(testStroke);
}
theLeftToRightStrokes.Remove(strokesToRemove);
This Visual Basic .NET example removes a Strokes collection, strokesToRemove, from a larger Strokes collection, theLeftToRightStokes, if the first point in the Stroke is not to the left of the last point in the Stroke. The original data in the Ink object are unaffected.
'...
Dim testStroke As Stroke
Dim strokesToRemove As Strokes = theLeftToRightStrokes.Ink.CreateStrokes()
For Each testStroke In theLeftToRightStrokes
Dim ptStart As Point = testStroke.GetPoint(0)
Dim ptEnd As Point = testStroke.GetPoint(testStroke.PacketCount - 1)
If ptStart.X > ptEnd.X Then
strokesToRemove.Add(testStroke)
End If
Next
theLeftToRightStrokes.Remove(strokesToRemove)
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0